Flip View Iphone

后端 未结 3 664
感动是毒
感动是毒 2020-12-01 01:08

please consider the code below, and tell me what I\'m doing wrong.

I want to flip between two UIViews.

Somehow, when I flip away from the initial view, I jus

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 01:46

    It's probably because you aren't using a container view as the transition view. Refer to the documentation on setAnimationTransition:forView:cache:

    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:

    1. Begin an animation block.
    2. Set the transition on the container view.
    3. Remove the subview from the container view.
    4. Add the new subview to the container view.
    5. Commit the animation block.

    Try using self.view.superview in the animation transition view of the showMoreInfo:

    The reason the showLessInfo: method works is you are using a container view.

提交回复
热议问题