c# - Moving Position of View animated -
i have problem animating movement of view. works stucks if start animating movement. without animation works fluently. if set animation starts stucking. here code:
uiview.beginanimations("slide"); this.detailcontroller.view.layer.position = new pointf(50,50); uiview.commitanimations();
i tried:
- setting :
this.detailcontroller.view.center = new pointf(50,50);
- working coreanimations
is there possibility make thie animation more fluently ?
thanks in advance.
the default animation duration .2 seconds, might fast visible in case.
if want fluid animations, play duration , easing functions. make sure set parameters @ beginning of animation block (just after beginanimation
) or won't taken account.
uiview.beginanimations("slide"); uiview.setanimationduration (2); uiview.setanimationcurve (uiviewanimationcurve.easeinout); detailcontroller.view.layer.position = new pointf(50,50); uiview.commitanimations();
for more info, read http://docs.xamarin.com/recipes/ios/animation/coreanimation/animate_a_uiview_using_uikit
Comments
Post a Comment