objective c - ios animation, rotating button, button suddenly changes position -


i trying implement animations in application. want try simple rotation of button. button rotated, changes position , rotation angle different 1 want. have added autoresizessubwievs = no;

- (ibaction)rotateview:(id)sender {     [uiview animatewithduration:0.6f delay:0.1 options:uiviewanimationoptioncurveeaseout animations:^{     self.view.autoresizessubviews = no;     [self.buttoner settransform:cgaffinetransformrotate(self.buttoner.transform, 90.0f)];     } completion:nil]; } 

what doing wrong? can please me?

edit: have 2 buttons, when first gets pressed, call above method ... causes move first button , move second button , rotate inappropriate angle. dont understand @ all..

for angle problem, instead of passing 90, should pass radian value of angle m_pi/2 .

[self.buttoner settransform:cgaffinetransformrotate(self.buttoner.transform, m_pi/2)]; 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -