ios - Objective-C - Animate button with blocks? -


i have uiscrollview , uibutton. using blocks animate them button won't animate while uiscrollview does? can not animate button this?

any appreciated greatly!

- (void)viewdidload {      [super viewdidload];      draw1 = 0;     scrollview.frame = cgrectmake(0, -200, 768, 200);     [scrollview setcontentsize:cgsizemake(768, 200)];      openmenu.frame = cgrectmake(680, 100, 55, 55);  }    - (ibaction)openmenu:(id)sender {      if (draw1 == 0) {          draw1 = 1;         cgrect optionsdrawer = scrollview.frame;         cgrect optionsbutton = openmenu.frame;         optionsdrawer.origin.y += 200;          [uiview animatewithduration:0.5                          animations:^{                              scrollview.frame = optionsdrawer;                              openmenu.frame = optionsbutton;                          }];     } else {          draw1 = 0;          cgrect optionsdrawer = scrollview.frame;         cgrect optionsbutton = openmenu.frame;         optionsdrawer.origin.y -= 200;         [uiview animatewithduration:0.5                          animations:^{                              scrollview.frame = optionsdrawer;                              openmenu.frame = optionsbutton;                          }];      }  } 

ah! forgot add origin button well! oops!

fixed adding each:

optionsbutton.origin.y += 200; 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -