iphone - How to resize view when using UINavigationController setToolbarHidden:animated: -


i'm using uinavigationcontroller toolbar. before display it, resize views don't blocked toolbar (i set frame of current view controller's view rect spanning bottom of navigationbar top of toolbar.

but not of view controllers have toolbaritems. so, when switching view controller has items (controller a) 1 doesn't (controller b), want hide toolbar. however, when call settoolbarhidden:animated: in b's viewwillappear:animated: method, toolbar animates down during push transition , shows uiwindow background behind it.

this happens in reverse direction: when transitioning b (via button), want toolbar animate in show a's toolbaritems again, since a's view doesn't extend bottom of screen, uiwindow visible during pop transition.

that might not have been best description, here's screenshot:

cmd-shift-3 rapid-fire ftw

i have tried updating a's frame in viewwilldisappear:animated: method, strange things, since seems called within uinavigationcontroller push animation block. insight appreciated.

update: tried hiding toolbar in b's viewdidappear:animated: instead, results weren't ideal. using solution, toolbar doesn't dismissed until push transition completes. since b doesn't have toolbaritems, a's items pushed left during transition, leaving empty toolbar on screen before disappears. also, when going a, uiwindow background visible unless set toolbar visible in b's viewwilldisappear:animated:, mean b has know has toolbaritems.

maybe best practice call settoolbarhidden:animated: in b's viewdidappear?

or can change a's frame before pushing b navigation controller in pushviewcontroller:animated: method in custom uinavigationcontroller subclass.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -