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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -