ios - Call master view controller from within detail view of split view controller -
i have tab bar controller 3 tabs, each embedded within own navigation controller. works great, i’m trying put entire tab bar controller within split view controller.
the problem navigation on master view split view controllers hides existing navigation views inside tab bar controller. if hide master view navigation, tab bar controller navigation have no way of getting master list. can add button in programmatically works on ipad.
navigationitem.leftbarbuttonitem = splitviewcontroller?.displaymodebuttonitem() navigationitem.leftitemssupplementbackbutton = true i tried playing around various options preferreddisplaymode, again, works on ipad. has no effect on iphone. can add in custom button programmatically view controller within tab view controller , call action there, don't know action call. tried calling action on displaymodebuttonitem:
splitviewcontroller?.displaymodebuttonitem().action that didn't work either. able programmatically add in behavior of button split view controller adds on iphone.
i ended scrapping split view controller , using anther tab. had similar problem in app , figured out kind of hacky solution. embedded tab bar controller inside navigation controller. causes multiple navigation controllers appear did check in viewwillappear hide whichever navigation controller causing issue.
if let hidden = tabbarcontroller?.navigationcontroller?.navigationbarhidden { if hidden == true { tabbarcontroller?.navigationcontroller?.navigationbarhidden = false } } this app has split view controller root view controller , tab bar controllers in both master , detail views. every view embedded in navigation controller , show or hide navigation bar depending on if have duplicate.

Comments
Post a Comment