swift - Tab Bar mysteriously disappears? -
attached 2 images. first shows current main.storyboard, , second shows problem when run app. have tab bar controller has 2 tabs. on first tab there button. when pressed, button goes view controller content. @ top navigation bar button. after viewing content, press button, , on original page button, tab bar missing. have seen few answered questions, appears made tab bar in view controller instead of storyboard. says should never return previous view unless use unwind segue. true? if so, how set unwind segue. if not, how fix problem otherwise? thank you. http://i.stack.imgur.com/iymx2.png http://i.stack.imgur.com/7slt5.png
the problem in wiring of viewcontrollers. have embedded uitabbarcontroller inside uinavigationcontroller , not other way around.
a correct layout looks in interface builder :

to reproduce:
- in interface builder drop
uitabbarcontroller. come 2uiviewcontroller's wired in. - pick 1 of
uiviewcontroller's (let's callvcontroller1) , click on editor / embed in / navigation controller. wiresvcontroller1live insideuinavigationcontrollerinsideuitabbarcontroller - add 3rd
uiviewcontrollernextvcontroller1let's callvcontroller3 - wire in segue between
vcontroller1,vcontroller3, example button.
i hope that's clear enough
Comments
Post a Comment