I'm porting my UI to iOS7. One of the problems I found is that the default back button with customized background doesn't show the background, but only title after pushing the new controller to UINavigationViewController
. The background shows once I hit the back button and then shows all next times I move back and forth between the controllers. Does anybody know how to resolve it?
Thanks!
UPDATE - adding image: after first push:
after click and push again:
Note - the arrow is a custom stretchetable image, that is set by using:
[[UIBarButtonItem appearanceWhenContainedIn:[MyNavigationController class], nil] setBackButtonBackgroundImage:[[UIImage imageNamed:@"navigationBarButtons_back"] stretchableImageWithLeftCapWidth:17 topCapHeight:0.0] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearanceWhenContainedIn:[MyNavigationController class], nil] setBackButtonBackgroundImage:[[UIImage imageNamed:@"navigationBarButtons_backPress"] stretchableImageWithLeftCapWidth:17 topCapHeight:0.0] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];