iOS8 Swift: Navigation and Tool Bars don't show up -
navigationbar , toolbar not showing in simulator. went through similar questions posted in forum , included learnt answers. still i'm unable figure out why bars not shown. included following lines viewwillappear()
//show toolbar , navbar
self.navigationcontroller?.setnavigationbarhidden(false, animated: true) self.navigationcontroller?.settoolbarhidden(false, animated: true)
below screenshot of storyboard.
the simulator screenshot appears
i reach view controller tableviewcontroller (which embedded in tabbarcontroller) programmatically, following code
var nextcontroller = imagepickviewcontroller()
nextcontroller = self.storyboard?.instantiateviewcontrollerwithidentifier("imagepicker") as! imagepickviewcontroller
self.presentviewcontroller(nextcontroller, animated: true, completion: nil)
any appreciated. please let me know if additional information required.
thanks in advance hari
thank james udacity. posting diagnosis.
the toolbars didn't show because used presentviewcontroller. embedded navigation controller bypassed , imagepickviewcontroller presented directly.
solution start navigation controller using segueidentifier. added segue tableviewcontroller navigation controller (of imagepickviewcontroller). in attribute inspector segue, set identifier "startimagepicker". in tableviewcontroller code, start imagepickviewcontroller calling performseguewithidentifier -
self.performseguewithidentifier("startimagepicker", sender: self)
thanks hari
Comments
Post a Comment