If you simply convert the code in the question to Swift, it looks like this.
(Use from inside AppDelegate)
iflet vc=window?.rootViewController?presentedViewController{
// The vc contains a UIViewController
}
577 PHP ssh2_scp_send fails to send files as intended
572 Understanding How to Configure Google API Key
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
887 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
610 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.