esilver
esilver

Reputation: 28463

UINavigationController sometimes missing back button on iOS5

Since the iOS 5 upgrade, we have had intermittent reports of a missing back button, something that is supplied by the UINavigationController.

This app has been live on the app store > 1 year so it is unlikely this issue is resolved by the advice provided here, here or here.

I have attached a screenshot showing this issue. Unfortunately I have not been able to repro it on the simulator or on my device, but we have had several reports so far from users.

missing back button

Has anyone else encountered and/or successfully resolved this issue in iOS5?

Thanks!

Upvotes: 1

Views: 1350

Answers (1)

esilver
esilver

Reputation: 28463

I believe I have uncovered the cause of this issue in at least one of the cases. When a user in iOS 5 clicked on a notification, this callback would be called:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

This method would push a view onto the UINavigationController, which actually was new behavior we recently introduced. If the application was previously running it would work properly. If the application was not previously running, it would prematurely push a view onto the navigationcontroller prior to everything being initialized.


Separately from this, there was another issue that caused this bug. I was setting the title of the previous view to the empty string @"", not to be confused with nil, and in this case no back button was being drawn. So, be careful not to ever set the title of your view to the empty string or you will not get a back button!

Upvotes: 4

Related Questions