ios - Custom dismiss transition without segue -
i have seen various questions/answers on similar topics, none of them seem recent.
if using pushviewcontroller present view controller custom transition, without segue, proper way specify dismiss transition, , should place animation code?
push , initial transition:
let tr = catransition(); tr.duration = 0.35; tr.type = kcatransitionpush; tr.subtype = kcatransitionfromtop; self.navigationcontroller!.view.layer.addanimation(tr, forkey: kcatransition); self.navigationcontroller?.pushviewcontroller(vc, animated: false);
the way set push animation obsolete. of ios 7, there method of uinavigationcontrollerdelegate allows return custom animator object.
the method signature -navigationcontroller: animationcontrollerforoperation: fromviewcontroller: toviewcontroller` of `uinavigationcontrollerdelegate
for more information - check docs.
Comments
Post a Comment