I use the following code to create a custom menu transition. For the past two hours, I have been trying to find out why the picture looks blank (only using the iPhone 7 Plus simulator). But when I wanted to create a video to turn it into a gif for this stream, it worked on my iPhone 6S Plus.
Update: Works on iPhone 6S Simulator. But still not in 7 Plus.
import UIKit class PresentMenuAnimator : NSObject { } extension PresentMenuAnimator : UIViewControllerAnimatedTransitioning { func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { return 0.6 } func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { let fromVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from) let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) let containerView = transitionContext.containerView containerView.insertSubview((toVC?.view)!, belowSubview: (fromVC?.view)!)
iPhone 6S Plus (physical device) iOS 10

iPhone 7 Plus (simulator) iOS 10


Why is the snapshot on the simulator empty?
GitHub Testing Project
source share