Can we pass a few parameters for the UIView transitionWithView: duration: options: animations: complete: method?

I am trying to pass a few parameters to the UIView transitionWithView:duration:options:animations:completion: method.

In particular, I need the options UIViewAnimationOptionTransitionCurlUp and UIViewAnimationOptionAllowUserInteraction , since my user interface does not respond during the animation.

Any help would be appreciated.

+4
source share
1 answer

Yes, just use the | to perform a bitwise OR of them, combining them - for example:

 [UIView transitionWithView:containerView duration:0.2 options:(UIViewAnimationOptionTransitionCurlUp | UIViewAnimationOptionAllowUserInteraction) animations:^{ [fromView removeFromSuperview]; [containerView addSubview:toView]; } completion:NULL]; 
+5
source

Source: https://habr.com/ru/post/1402657/


All Articles