ios - Opening and closing form animation -
is animation possible in ios, third party api's that?
figured out myself nested animations
-(void)viewdidload { expandiview = [[uiview alloc] initwithframe:cgrectmake(137, 269, 30, 2 )]; expandiview.backgroundcolor = [uicolor redcolor]; [self.view addsubview:expandiview]; expandiview.hidden=yes; } -(ibaction)expand:(id)sender { expandiview.hidden=no; [uiview animatewithduration:0.5f animations:^{ expandiview.frame = cgrectmake(60, 269, 200, 2); } completion:^(bool finished) { [uiview animatewithduration:1 animations:^{ expandiview.frame = cgrectmake(60, 269, 200, 100); }]; }]; } -(ibaction)collapse:(id)sender { [uiview animatewithduration:0.5f animations:^{ expandiview.frame = cgrectmake(60, 269, 200, 2); } completion:^(bool finished) { [uiview animatewithduration:0.5f animations:^{ expandiview.frame = cgrectmake(137, 269, 30, 2); } completion:^(bool finished) { expandiview.hidden=yes; }]; }]; }
Comments
Post a Comment