We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code does not work in new project created in Xcode 11.1 due to the changes to SceneKit.
if let tabBarController = window?.rootViewController as? UITabBarController { let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: "NavController") vc.tabBarItem = UITabBarItem(tabBarSystemItem: .topRated, tag: 1) tabBarController.viewControllers?.append(vc) }
I was able to get it working by doing the following in a new project:
SceneDelegate.swift
Application Scene Manifest
Info.plist
AppDelegate.swift
var window: UIWindow?
application(_ :, configurationForConnecting:, options:)
application(_:, sceneSessions:)
The text was updated successfully, but these errors were encountered:
The other option is to add it to SceneDelegate instead I updated the willConnectTo method from:
SceneDelegate
willConnectTo
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let _ = (scene as? UIWindowScene) else { return } }
to :
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let _ = (scene as? UIWindowScene) else { return } if let tabbedBarController = window?.rootViewController as? UITabBarController { let storyboard = UIStoryboard(name:"Main", bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: "NavController") vc.tabBarItem = UITabBarItem(tabBarSystemItem: .topRated, tag: 1) tabbedBarController.viewControllers?.append(vc) } }
Sorry, something went wrong.
Yes the two method are very simplified and understandable
No branches or pull requests
The following code does not work in new project created in Xcode 11.1 due to the changes to SceneKit.
I was able to get it working by doing the following in a new project:
SceneDelegate.swift
Application Scene Manifest
inInfo.plist
AppDelegate.swift
, do the following:var window: UIWindow?
application(_ :, configurationForConnecting:, options:)
andapplication(_:, sceneSessions:)
The text was updated successfully, but these errors were encountered: