ios - UINavigationController's interactivePopGestureRecognizer not working -
i trying implement custom id <uiviewcontrolleranimatedtransitioning>
object when pushing 1 particular view controller on navigation controller's navigation stack.
however, have discovered, doing prevents uinavigation controller using default interactive transition, even on view controllers not use custom transition.
i have no idea why occurring.
after further investigation, have found returning nil method
- (id <uiviewcontrolleranimatedtransitioning>)navigationcontroller:(uinavigationcontroller *)navigationcontroller animationcontrollerforoperation:(uinavigationcontrolleroperation)operation fromviewcontroller:(uiviewcontroller *)fromvc toviewcontroller:(uiviewcontroller *)tovc
somehow disables default interactive transition well.
how can continue using uinavigationcontroller's default interactive transition in instances, while using custom transition object in others?
here's blog post detailing possible solution. have not tested it. seems quite hackish workaround. author says break if apple changes things, hey.
quote:
what ended doing creating new instance of
uiscreenedgepangesturerecognizer
, configure left edge , set exact same target/action ourinteractivepopgesturerecognizer
, other words, instance of_uinavigationinteractivetransition
, actionhandlenavigationtransition:
. , adduinavigationcontrollers
view. there bit of-valueforkey:
,nsselectorfromstring()
in final solution not proud of, works perfectly. remember safe when implementing solution this, apple change stuffs, know.
Comments
Post a Comment