swift - Simulating a UINavigationController Pop -


i'm using navigation controller , works great. however, custom buttons segue new viewcontrollers (not in stack) , don't push-type transition animation uses.

goal: want transitions (described above) mimic nav-stack pop transition (where current view slides right, revealing view underneath).

i've simulated nav-pop using below code, after buttons , nav-bar button super glitchy.

@ibaction func page2_to_page1_butpush(sender: anyobject) {      var curpage: uiviewcontroller = self.storyboard!.instantiateviewcontrollerwithidentifier("page2_id") as! uiviewcontroller     var prevpage: uiviewcontroller = self.storyboard!.instantiateviewcontrollerwithidentifier("page1_id") as! uiviewcontroller      self.navigationcontroller?.pushviewcontroller(prevpage, animated: false)     self.navigationcontroller?.pushviewcontroller(curpage, animated: false)     self.navigationcontroller?.popviewcontrolleranimated(true)  } 

can supply simple way make segues simulate nav-pop?

details: x-code 6.4 swift storyboard

here's solution:

ios segue - left right -

simple, easy, works perfect. add "seguefromleft" class code shown in link, select segue want present left, select custom, pointed @ "seguefromleft", , animation dead on.

bonus: better, syncs navigation controller, nav "back" button still works.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -