ios - UIView transition animation -
ios - UIView transition animation -
viewb
, viewc
subviews of viewa
. viewb
on top of viewc
. bring viewc
on top flipping animation shown in diagram. utilize uiview
class method (void)transitionfromview:(uiview *)fromview toview:(uiview *)toview duration:(nstimeinterval)duration options:(uiviewanimationoptions)options completion:(void (^)(bool finished))completion
. however, viewa
gets flipped along viewb
not desired behavior. desired behavior viewb
flip on , viewc
on top. thought how accomplish desired behavior?
try :
-(void)filpanimation { viewobjb.alpha=1.0; viewobjb.hidden=no; [uiview transitionwithview:viewobjb duration:1.5 options:uiviewanimationoptiontransitionflipfromright animations:^{ viewobjb.hidden=yes; viewobjb.alpha=0.0; } completion:nil]; viewobjc.alpha=0.0; viewobjc.hidden=yes; [uiview transitionwithview:viewobjc duration:1.5 options:uiviewanimationoptiontransitionflipfromleft animations:^{ viewobjc.hidden=no; viewobjc.alpha=1.0; } completion:nil]; }
ios objective-c animation uiview
Comments
Post a Comment