ivanvorobei / SPLarkController

Custom transition between controllers. Settings controller for your iOS app.
https://opensource.ivanvorobei.io
MIT License
988 stars 47 forks source link

iOS 15 - Presented view controller appears briefly in front of the snapshot before transition #19

Open Kohdepitcher opened 2 years ago

Kohdepitcher commented 2 years ago

Coming back to this library to give it another go in a project but I noticed a visual bug with the presentation as it briefly flashes the target view controller in front of the snapshot before the snapshot animates up to reveal the underlying view controller.

I've attached a video of the bug in the simulator when showing the destination view controller. Note that it doesn't happen all the time and also happens on a physical device.

https://user-images.githubusercontent.com/15321325/168462778-3d550a61-0799-4ae5-b8c7-b0d2fba488f0.mp4

Here is the code that I'm using to present the view controller: let transitionDelegate = SPLarkTransitioningDelegate() transitionDelegate.customHeight = self.view.frame.height * 0.60 palleteVC.transitioningDelegate = transitionDelegate palleteVC.modalPresentationStyle = .custom palleteVC.modalPresentationCapturesStatusBarAppearance = true

self.present(palleteVC, animated: true, completion: nil)

This never happened when I tried out this library for another project back in 2019. Not sure if its the UIHostingViewController that is being presented or if its something to do with iOS 15

Thanks!