ios - Tab Bar child viewWillAppear doesn't fire, adding NavigationController gives two navigation bars -


i'm trying complete first ios application.

my storyboard layout this:

navigation controller '-> view controller     '->tab bar controller        |->table view controller        |  '->view controller        '->table view controller           '->view controller 

all of views shown push (not modal) need navigation. problem when go last view table view, viewwillappear doesn't fire. added navigation controllers:

navigation controller '-> view controller     '->tab bar controller        |->navigation controller        |  '->table view controller        |     '->view controller*        '->navigation controller           '->table view controller              '->view controller 

this fixes viewwillappear problem, tab bar still shows @ bottom , navigation bar in table view , final view (see below - corresponds * above). pressing top "< back" button takes me first view (wrong), pressing second "< back" button takes me table view (correct)

questions:

  • what doing wrong here???
  • when should view have navigationcontroller? ok have 1 whole storyboard or should have more.
  • if put navigation controller after tab bar, bottom tab bar stays. how rid of it?
  • should avoid tab bars?

enter image description here

update:

this bizarre. if recreate story board can narrow down initial view controller / navigation controller pair. no idea issue swapping these out fresh pair solves it.

  • from apple uitabbarcontroller docs

    you can use navigation controllers or custom view controllers root view controller tab. if root view controller navigation controller, tab bar controller makes further adjustments size of displayed navigation content not overlap tab bar.

  • viewwillappear of tablevc should called regardless of embedded in navigationcontroller.

  • avoiding tab bars or not , single navigation controller storyboard app design related.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -