Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Bloubul

macrumors newbie
Original poster
Jul 9, 2011
6
0
I am working on a tab bar application. For one of the tabs I required a full screen camera preview. Hiding the tab bar left a white space at the bottom so I ended up using an additional new xib / UIViewController for that purpose using the ViewDidLoad method. So when the user selects the specific tab the one xib calls the other one.

However the code only executes once as it is currently using the viewDidLoad method. Is there a way to load the code every time someone selects the tab calling the first xib which in turns call the xib I am using for preview layer. I hope this doesn't sound too confusing.

Thanks in advance for any assistance.
 
Have u bothered checking into the documentation of UITabbarController, there is a method there to check what tab is clicked, you can do an index check, or check what tab is clicked by name. When that is triggered, pop up a modalviewcontroller with the camera (no need to hide the tabbar, since it overlaps it anyways, if you use the presentModalview fullscreen..)
 
No expert, and not sure I fully understand the post, but what about the viewWillAppear method?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.