ios - Strange UINavigationItem behavior after using custom navigation transitioning animations -
i doing custom uinavigationcontroller pop transition animation. having strange bug, i've made sample project demonstrate issue (taken https://github.com/objcio/issue5-view-controller-transitions)
an navigation-based app, 2 view controllers.
the first viewcontroller has 2 bar button items on navigationbar, button in middle of view push second viewcontroller.
the second viewcontroller has left bar button item pop first viewcontroller.
if second view controller has been dragged less 50%, custom animation cancel transition, , if it's on 50%, it'll finish transition, pop viewcontroller. (just system default)
however, if transition cancelled, navigation item's on first view controller over-ridded.
the "back" item appear on first view controller, , right bar button item disappear.
this video demonstrate: https://youtu.be/qg2luksntzk
and source code on github: https://github.com/johnnytseng/issue5-view-controller-transitions
could point out problem is? i've been debugging issue whole day. thanks!
in ios 7 apple add new default navigation behavior. can swipe left border of screen go on navigation stack.
you can stop putting code in application delegate.
if ([self.navigationcontroller respondstoselector:@selector(interactivepopgesturerecognizer)]) { self.navigationcontroller.interactivepopgesturerecognizer.enabled = no; } you can read more on here interactive pop gesture of navigation view controller
Comments
Post a Comment