ios - UIView hirarchy in UITransition View -
i trying percent driven animation. can't expected result presented view sliding in right. every time presenter view visible after transition.
ps.: trying interactive transition
func animatetransition(transitioncontext: uiviewcontrollercontexttransitioning) { //do animation allow fromvc = transitioncontext.viewcontrollerforkey(uitransitioncontextfromviewcontrollerkey) allow tovc = transitioncontext.viewcontrollerforkey(uitransitioncontexttoviewcontrollerkey) var container = transitioncontext.containerview() container.addsubview(fromvc!.view) container.addsubview(tovc!.view) container.bringsubviewtofront(tovc!.view) tovc!.view.frame.origin.x = -uiscreen.mainscreen().bounds.width; uiview.animatewithduration(self.transitionduration(transitioncontext), animations: { () -> void in tovc!.view.frame.origin.x = 0 }) { (success) -> void in transitioncontext.completetransition(success) } }
ios uiview swift transition
No comments:
Post a Comment