ios - Back button blinks on UISplitViewController -> detail segue -


i have iphone app , i'm trying make universal.

i added split view controller , both master , detail vcs embedded in navigation controllers, navigation bar show on both when they're visible @ same time, , can add displaymodebuttonitem() , all.

the problem that, on iphone, when 1 of vcs visible @ time, navigation controller detail vc embedded cause button sort of blink on show detail segue.

the difference subtle, it's bugging me.

here's how goes without navigation controller: without navigation controller

and here's how goes with navigation controller: with navigation controller

in gifs doesn't bad in actual iphone, can see difference. it's navigation controller arrow shows itself, , "reading" label catches up. without navigation controller, on other hand, arrow , "reading" label show @ same time (pay attention, you'll see it, haha).

to work around tried change segue when tapping on table view row in master vc i'd go straight actual detail vc, bypassing navigation controller. seemed work @ first, led other problems. instance, if on ipad , pushed other vcs on top of detail vc , tapped row on master vc, detail vc wouldn't pop root vc, when explicitly told in didselectrowatindexpath.

so doing wrong here, or uisplitviewcontroller quirk? know how fix or work around it?

thanks!

ok, figured out.

i had in detail vc's viewdidload when problem happening:

override func viewdidload() {     super.viewdidload()     self.navigationitem.leftbarbuttonitem = splitviewcontroller?.displaymodebuttonitem()     self.navigationitem.leftitemssupplementbackbutton = true } 

and noticed problem caused setting leftbarbuttonitem. changed this, , works great:

override func viewdidload() {     super.viewdidload()     if self.splitviewcontroller?.collapsed == false {         self.navigationitem.leftbarbuttonitem = splitviewcontroller?.displaymodebuttonitem()         self.navigationitem.leftitemssupplementbackbutton = true     } } 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -