更新时间:2023-11-10 10:15:40
这可能是因为您没有使用容器视图作为转换视图。请参阅 setAnimationTransition:forView:cache:
It's probably because you aren't using a container view as the transition view. Refer to the documentation on setAnimationTransition:forView:cache:
如果你想改变外观转换期间的视图 - 例如,从一个视图翻转到另一个视图 - 然后使用容器视图,UIView的实例,如下所示:
If you want to change the appearance of a view during a transition—for example, flip from one view to another—then use a container view, an instance of UIView, as follows:
在 showMoreInfo的动画转换视图中尝试使用
self.view.superview
:
showLessInfo:
方法的工作原理是您正在使用容器视图。
The reason the showLessInfo:
method works is you are using a container view.