UIViewAnimationOptionAllowUserInteraction 是否应用于动画视图或整个屏幕?
Does UIViewAnimationOptionAllowUserInteraction be applied to the views animated or the whole screen?
根据文档,此调用
[UIView animateWithDuration:0.3 animations:^{
someView.alpha = 1.0;
}];
等同于
[UIView animateWithDuration:0.3 delay:0.0 options:0 animations:^{
someView.alpha = 1.0;
} completion:nil];
– 因此不传递 UIViewAnimationOptionAllowUserInteraction 选项。如果不添加此选项会怎样?
动画中的所有视图(在此示例中 someView
)是否都不会收到任何用户交互或它是否适用于整个屏幕?
我在文档中找到的是
UIViewAnimationOptionAllowUserInteraction
Allow the user to interact with views while they are being animated.
它只影响动画视图。不是整个屏幕。
根据文档,此调用
[UIView animateWithDuration:0.3 animations:^{
someView.alpha = 1.0;
}];
等同于
[UIView animateWithDuration:0.3 delay:0.0 options:0 animations:^{
someView.alpha = 1.0;
} completion:nil];
– 因此不传递 UIViewAnimationOptionAllowUserInteraction 选项。如果不添加此选项会怎样?
动画中的所有视图(在此示例中 someView
)是否都不会收到任何用户交互或它是否适用于整个屏幕?
我在文档中找到的是
UIViewAnimationOptionAllowUserInteraction
Allow the user to interact with views while they are being animated.
它只影响动画视图。不是整个屏幕。