Post

Replies

Boosts

Views

Activity

Reply to viewWillTransition not called since change to UISceneDelegate
For everyone who is interested in this problem, here ist the solution: We didn’t implement the method application(_:didFinishLaunchingWithOptions:) inside our AppDelegate. This somehow caused the app to not call viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) inside our ViewControllers. After we changed our app to using a SceneDelegate we didn’t need the method in the AppDelegate anymore, so we removed it. It is also declared as optional in the documentation. So I think this should not have such an effect on the app, but at least it works now again.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’21
Reply to viewWillTransition not called since change to UISceneDelegate
Thanks for your reply! This is our scene configuration: <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> </dict> <dict> <key>UISceneConfigurationName</key> <string>Stub Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).StubSceneDelegate</string> </dict> </array> </dict> </dict> This is from our AppDelegate:         UISceneConfiguration(name: "Default Configuration", sessionRole: .windowApplication)     } And this from the SceneDelegate:         guard let windowScene = scene as? UIWindowScene else { return }         let window = UIWindow(windowScene: windowScene)         window.rootViewController = TestViewController()         self.window = window         window.makeKeyAndVisible() So I thinks this is very straightforward. It also works for me in another project without problems.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’21
Reply to viewWillTransition not called since change to UISceneDelegate
For everyone who is interested in this problem, here ist the solution: We didn’t implement the method application(_:didFinishLaunchingWithOptions:) inside our AppDelegate. This somehow caused the app to not call viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) inside our ViewControllers. After we changed our app to using a SceneDelegate we didn’t need the method in the AppDelegate anymore, so we removed it. It is also declared as optional in the documentation. So I think this should not have such an effect on the app, but at least it works now again.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to viewWillTransition not called since change to UISceneDelegate
Thanks for your reply! This is our scene configuration: <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> </dict> <dict> <key>UISceneConfigurationName</key> <string>Stub Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).StubSceneDelegate</string> </dict> </array> </dict> </dict> This is from our AppDelegate:         UISceneConfiguration(name: "Default Configuration", sessionRole: .windowApplication)     } And this from the SceneDelegate:         guard let windowScene = scene as? UIWindowScene else { return }         let window = UIWindow(windowScene: windowScene)         window.rootViewController = TestViewController()         self.window = window         window.makeKeyAndVisible() So I thinks this is very straightforward. It also works for me in another project without problems.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21