ios - Move to segmentedview with second tab visible -
i'm trying navigate segmented view 2 tabs / views , second tab / view must visible. folowing code can move segmented view first tab visible. tried segue navigation in footer , header disappears..
let mainviewcontroller: uitabbarcontroller = self.storyboard?.instantiateviewcontrollerwithidentifier("maincontroller") uitabbarcontroller; mainviewcontroller.selectedindex = 1; self.presentviewcontroller(mainviewcontroller, animated: false, completion: nil)
your code not correct. try this:
override func viewdidappear(animated: bool) { self.tabbarcontroller?.selectedindex = 1 }
Comments
Post a Comment