LeoNatan / LNPopupController

A framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.
MIT License
3.04k stars 342 forks source link

Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs #521

Closed rastaman111 closed 2 years ago

rastaman111 commented 2 years ago

Hello! My project started talking about this warning in one of the latest updates to your library

Crashlisting says that crashes happen on iOS 15 and 16 and on all possible devices

How can I fix this or is it on your side?

How to call VC showed in the screenshot

[ViewController] Calling -viewWillAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs on UIViewController to manually drive appearance callbacks instead. Make a symbolic breakpoint at UIViewControllerAlertForAppearanceCallbackMisuse to catch this in the debugger. View controller: <SoundBar.RxViewControllerPlayer: 0x11e07cc00>

[ViewController] Calling -viewDidAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs on UIViewController to manually drive appearance callbacks instead. Make a symbolic breakpoint at UIViewControllerAlertForAppearanceCallbackMisuse to catch this in the debugger. View controller: <SoundBar.RxViewControllerPlayer: 0x11e07cc00>

Снимок экрана 2022-11-06 в 22 09 06
rastaman111 commented 2 years ago

I am using the latest version of the library

LeoNatan commented 2 years ago

Hello, these warnings are harmless and can be ignored. Basically, I take charge over the public view lifecycle callbacks, so you get the correct timing, which is not possible with the system APIs. I’ll try to find a way to suppress those warnings.

LeoNatan commented 2 years ago

Fixed in latest release. Please test and let me know.

rastaman111 commented 2 years ago

@LeoNatan Hi

Great job, this warning stopped appearing