ios - Return to root controller from another tab -


  • first tab
    • navigation controller
    • table controller
    • details controller
  • second tab
    • view controller

hello!

a user on first tab looks table controller , opens detail controller , proceeds second tab , there doing something. returning first tab sees detail controller needed there table controller! can done double tap first tab icon how programmatically?

thanks help!

you can use tabbar delegate this:

func tabbarcontroller(tabbarcontroller: uitabbarcontroller, didselectviewcontroller viewcontroller: uiviewcontroller) {     if tabbarcontroller.selectedindex == 0 {         let navigationcontroller = viewcontroller as? uinavigationcontroller         navigationcontroller?.poptorootviewcontrolleranimated(true)     } } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -