简体   繁体   中英

Tapping preview in context menu on iPad doesn't animate presentation of full screen view controller

I have a context menu in my app that shows a photo preview above the actions, and tapping the preview presents that view controller full-screen. On iPhone, when you tap the preview there's a lovely animation - it bounces into full screen. But on iPad, when you tap the preview the context menu dismisses and then the screen appears without any animation.

This is the (new*) default behavior on iPad. The idea being you can use your own presentation animation. To get the system "pop" style that's default on iPhone, set the preferredCommitStyle to .pop on the UIContextMenuInteractionCommitAnimating object.

*I think it changed in iOS 13.4. This change broke the Photos app as well. 😅

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM