How can I use UIModalTransitionStylePartialCurl on a UIView that does NOT take up the whole screen?

后端 未结 8 1076
陌清茗
陌清茗 2021-01-30 11:06

In Apple\'s official Maps app for the iPhone, there is a small \'page curl\' button in the lower-right corner. When you press it, the map itself peels back to reveal some optio

8条回答
  •  花落未央
    2021-01-30 11:51

    I had a slight hiccough confusing

    .modalTransitionStyle
    

    and

    .modalPresentationStyle
    

    The first one goes on the TARGET viewController, e.g., the one you want underneath. The second goes on the PARENT viewController, e.g. the one that actually gets distorted by the curl. The OP got this right, but I got it wrong, and it was a frustrating 10 minutes before I figured it out. Throwing it on this post in case it gives someone else the head slap I needed.

提交回复
热议问题