ios - Problem with "Presenting a controller modally within a nav controller within a tab bar controller" -


my app has 2 distincts modes. there's tab bar controller in app delegate. there 2 tabs, both using subclassed view controllers. 2 view controllers contain nav controller each. nav controllers have root view controller, , when changing screens, push , pop controllers of respective nav controller. has (normal) effect bottom tab bar visible, great , sound.

this 1 time i'd present screen modally however, user can't else confirm or cancel page using 2 buttons, ie want hide bottom tab bar. case presenting view modally thought, view presented within nav controller bounds seems, bottom tab bar still visible, , causes confusion in navigation app. i'm not sure how it's possible modally presented view not hiding tab bar. of questions around here seem have problem other way around (wanting (incorrectly) present modal view , leave tab bar visible).

these attempts:

[self presentmodalviewcontroller:controller animated:yes]; // inside tab bar controller :-( [self.tabbarcontroller presentmodalviewcontroller:controller animated:yes]; // nothing displayed. new controller instantly deallocated. [self.navigationcontroller presentmodalviewcontroller:controller animated:yes]; // inside tab bar controller :-( 

investigating this, self.tabbarcontroller nil. there seems no link tab bar controller... guess, display modally on top of tab bar, need link tab bar controller?

i seem have found solution, i'm not sure it's kosher, because somehow wasn't able use self.tabbarcontroller pointer of view controller in start view controller call.

what did reach app delegate, app delegate having tab bar controller defined public property. use tab bar controller property modally display view controller on on screen.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -