UIApplication.shared.delegate equivalent for SceneDelegate xcode11?
问题 I have defined a let property within my SceneDelegate. I would like some of the ViewControllers to be able to access that within the scene. In UIKit I could access App Delegate properties like this: UIApplication.shared.delegate then casting and specifying the property name... Is there an equivalent to get the a reference to the SceneDelegate the view controller is in from the UIViewController's instance? 回答1: As of iOS 13, UIApplication has the connectedScenes property which is Set<UIScene>