I'm adapting Apple's DrillDownSave sample code, which let's you transition between views using a Navigation Controller.
What I want to do is have the first two screens NOT have the top bar. I can do that by putting this in the first two views 'viewWillAppear' method:
Code:
// turn off the navigationBar (top bar)
[[self navigationController] setNavigationBarHidden:YES animated:NO];
Great... no top bar. But now I am struggling to implement a button (UIButton) which will perform exactly the same function as the hidden UINavigationController back button. Any ideas?
Add a UIButton to your interface, in the action for that call popViewControllerAnimated: on the navigationController. If you're inside a view controller, you can use [self.navigationController popViewControllerAnimated:YES];
Add a UIButton to your interface, in the action for that call popViewControllerAnimated: on the navigationController. If you're inside a view controller, you can use [self.navigationController popViewControllerAnimated:YES];
make screenshot of real button (both inactive and active) and then use that as the image for the two states of your button.
please use the search function, this question has been asked a gazillion times.
Thanks so much!
I actually did search the web for several hours, and only found this particular thread. Also, I've just used the search utility for this board, and could not find any related posts. At the risk of a thrashing ;-) can you suggest what terms would return related articles? I'd like to read any related posts ... and I guess my brain is not cooperating with search terms that will work (and it's not even Monday).
I actually did search the web for several hours, and only found this particular thread. Also, I've just used the search utility for this board, and could not find any related posts. At the risk of a thrashing ;-) can you suggest what terms would return related articles? I'd like to read any related posts ... and I guess my brain is not cooperating with search terms that will work (and it's not even Monday).
So after more searching, I still haven't found much.
I did however try the suggestion to take a screen snapshot of the "real" back button and use it's image. When I try this, the captured image displays as a blank. I know the code is okay because I can open any of the standard image files and they display properly. Just the ones I drop into the xcode folder display as blank. I've searched alot for a solution but no luck.
Hey,
I'm having the same problem.. did you manage to sort this out?
I take a screenshot of the back button, which is fine, but Apple applies the default effects to it (as for all UIButtonBarItem's), and this makes it look incorrect, appearing white.