ios - I'd like to have a UITabBarController, with no UITabBar -
i'm building akin uisplitview on ipad. "master" panel have buttons, instead of list.
the detail panel have @ 7 different screens (corresponding buttons in master pane).
so, i'd build uitabbarcontroller in interfacebuilder (for no other reason it's easy view). each button press in "master" view tell tab-bar controller show different panel.
can done, or approach silly? suppose create container view, , swap view-controllers in , out. using uitabbarcontroller in ib makes obvious (visually) these views connected.
thanks advice.
i did same thing, unable hide tab bar in clean , legal way.
so, decided change approach: use uitabbar in storyboard "placeholder" connections , fill viewcontrollers
array of splitcontroller, when loading splitcontroller, load programmatically uitabbarcontroller storyboard, copy content of viewcontrollers
array and, finally, dismiss uitabbarcontroller.
with approach have manage transition between vc , another, have:
- the possibility set
viewcontrollers
storyboard (that best part imho) - the possibility use
tabbaritem
icon menu controller
so, more schematic:
- create splitcontroller instance
nsarray* viewcontrollers
instance variable - you can add
initwithtabbarcontroller:
instance method splitcontroller , pass programmatically loadedtabbarcontroller
instance. - in
initwithtabbarcontroller
method, fillviewcontrollers
array usingtabbarcontroller.viewcontrollers
property. can "trash" tab bar controller instance, don't need it - you have manage transition 1 controller yourself. this, suggest use main view container view controller.
i think approach have clean , readable storyboard, i'm updating projects use it.
regards fabio
Comments
Post a Comment