Re: Navigationbar doesn't work in iOS 7.1 / 8 with XCODE 6.2
Re: Navigationbar doesn't work in iOS 7.1 / 8 with XCODE 6.2
- Subject: Re: Navigationbar doesn't work in iOS 7.1 / 8 with XCODE 6.2
- From: Alex Zavatone <email@hidden>
- Date: Mon, 06 Apr 2015 16:01:30 -0400
Don't worry about your English. It's better than my Portuguese.
Are you trying to push a view controller onto the navigation stack, or are you trying to present a modal controller?
Are you sure you want to use presentViewController? This is the replacement for presenting a modal controller.
I think you are trying to push a view controller onto the navigation stack.
If that is true, then try this instead:
[ self.navigationController pushViewController:formPedirTaxi animated:YES ];
If that doesn't work, try asking on http://www.stackoverflow.com
Good luck.
Alex Zavatone
On Apr 6, 2015, at 3:49 PM, wesley.dias wesley.dias wrote:
> In this point of my app i must show the navigationBar. I did the change that you've sent but still doesn't work. Here is the other section of my code:
>
> - (void)viewDidLoad
>
> {
>
> [ super viewDidLoad ];
>
> mapReference = [ [ self.navigationController viewControllers ] objectAtIndex:1 ];
>
> appDelegate = ( AppDelegate * ) [ [ UIApplication sharedApplication ] delegate ];
>
> uiCompEndereco.text = appDelegate.dataParser.pedido.endereco.endGeral;
>
> uiCompNumero.delegate = self;
>
> uiCompComplemento.delegate = self;
>
> uiCompReferencia.delegate = self;
>
> uiCompConvenio.delegate = self;
>
> uiCompVoucher.delegate = self;
>
> [ self disableVoucherFields ];
>
> [ uiCompBtnFormPgtoDinheiro addTarget:self action:@selector(checkFormPgmto:) forControlEvents:UIControlEventTouchUpInside ];
>
> [ uiCompBtnFormPgtoCartao addTarget:self action:@selector(checkFormPgmto:) forControlEvents:UIControlEventTouchUpInside ];
>
> [ uiCompBtnFormPgtoVoucher addTarget:self action:@selector(checkFormPgmto:) forControlEvents:UIControlEventTouchUpInside ];
>
> uiCompBtnAcessibilidade.backgroundColor = [ appDelegate colorFromHexString:@"#94959a" ];
>
> }
>
>
>
> - (void)viewWillAppear:(BOOL)animated
>
> {
>
> [ super viewWillAppear:animated ];
>
> appDelegate.dataParser.pedido.formaPagamento = 1;
>
> appDelegate.dataParser.pedido.acessivel = 0;
>
> UIBarButtonItem *btnVoltar = [ [ UIBarButtonItem alloc ] initWithTitle:@"Voltar" style:UIBarButtonItemStyleBordered target:self action:@selector( backToMap ) ];
>
> self.title = @"Pedir Táxi";
>
> self.navigationItem.leftBarButtonItem = btnVoltar;
>
> self.navigationController.navigationBar.hidden = FALSE;
>
> // more code here
>
> }
>
>
>
> PS:
>
> Forgive my english, i am a brazilian and i know few words in english.
>
> Thank you.
>
> 2015-04-06 16:40 GMT-03:00 Alex Zavatone <email@hidden>:
> Thanks for the image Wesley, but can you tell us what is wrong with it? Are we supposed to be seeing a navigation bar?
>
> Are you saying that the presentViewController:animated:completion: is covering up your view controller?
>
> It looks like you're asking the navigation controller to do the presenting of the view controller instead of asking the current view controller to do the presenting.
>
> Try removing the .navigationController from self.navigationController
>
> Try this:
>
> [ self presentViewController:formPedirTaxi animated:true completion:nil ];
>
> Not
>
> [ self.navigationController presentViewController:formPedirTaxi animated:true completion:nil ];
>
> I think that will work for you. You're having the wrong object doing the presenting.
>
> Cheers,
> Alex Zavatone
>
>
> On Apr 6, 2015, at 3:32 PM, wesley.dias wesley.dias wrote:
>
>> Okay. Here is the image:
>>
>> <IMG_0010.PNG>
>>
>>
>> I am openning this with:
>>
>> [ self.navigationController presentViewController:formPedirTaxi animated:true completion:nil ];
>>
>>
>> 2015-04-06 16:27 GMT-03:00 Alex Zavatone <email@hidden>:
>> A little more specifics will help us narrow this down.
>>
>>
>> Updating from which version of Xcode to which version?
>>
>> Which version of iOS was this working on? Which version of iOS are you using now?
>>
>> We can't see your device, so we don't know what about the navigationBar doesn't work.
>>
>> Is it incorrect position, the bar not displaying, UI elements don't do anything when tapped, what exactly?
>>
>> How are you hooking up your navigationBar? Is it done in the storyboard or in code?
>>
>>
>> I'd recommend looking at how the navigationBars are hooked up in the parts of your app where they do work and comparing that to how the navigationBars are hooked up in the parts of your app where they do not work.
>>
>> Good luck,
>> Alex Zavatone
>>
>>
>> On Apr 6, 2015, at 3:17 PM, wesley.dias wesley.dias wrote:
>>
>> > Hi,
>> >
>> > I have an application using the native API. After update my XCODE and my
>> > test phones( 01 iPhone 4S and 01 iPhone 5 ), the navigationbar in some
>> > parts of my app doesn't work.
>> >
>> > Can someone help me? There is no log errors...
>> >
>> > Thanks!
>> >
>> > --
>> >
>> > Atenciosamente,
>> >
>> > Wesley C. Dias de Oliveira
>> >
>> > Desenvolvimento
>> >
>> > +55 (31) 3324-5710
>> >
>> > Avenida Luiz Paulo Franco, 603 – 3º andar – Belvedere – BH – MG – CEP:
>> > 30320-570
>> >
>> > Transformando localização em soluções inteligentes
>> > _______________________________________________
>> >
>> > Cocoa-dev mailing list (email@hidden)
>> >
>> > Please do not post admin requests or moderator comments to the list.
>> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> >
>> > Help/Unsubscribe/Update your Subscription:
>> >
>> > This email sent to email@hidden
>>
>>
>>
>>
>> --
>> Atenciosamente,
>>
>> Wesley C. Dias de Oliveira
>>
>> Desenvolvimento
>>
>>
>> +55 (31) 3324-5710
>>
>> Avenida Luiz Paulo Franco, 603 – 3º andar – Belvedere – BH – MG – CEP: 30320-570
>>
>> Transformando localização em soluções inteligentes
>>
>>
>>
>
>
>
>
> --
> Atenciosamente,
>
> Wesley C. Dias de Oliveira
>
> Desenvolvimento
>
>
> +55 (31) 3324-5710
>
> Avenida Luiz Paulo Franco, 603 – 3º andar – Belvedere – BH – MG – CEP: 30320-570
>
> Transformando localização em soluções inteligentes
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden