non UIView animation: animations not playing sometimes, UIView animation: working fine

社会主义新天地 提交于 2019-12-06 03:07:22

Try to set the UIView animation parameters before you push your viewcontroller.

Here's an example:

[UIView beginAnimation:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:viewController1.view cache:NO];

[viewController0 pushViewController:viewController1 animated:YES];
[UIView commitAnimations];

Maybe it's because of the boolean u used. My animation is quite the same but it's working fine:

[UIView animateWithDuration:4.0 animations:^(void) {
        [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
        pfeil.alpha = 1.00;
         }];

thats my code...any questions?

Maybe you have a lot of data to load in your VC? if you load your data in main thread it stops all user interactions and UI responses for a while.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!