|
I had writted code in appdelegate to add duplicate viewcontroller via code to tabcontroller, but I did not find another viewcontroller added to tabbarcontroller `func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
There is an outdated code in the Project 7 of the book Hacking with iOS / 100 Days of Swift The Xcode 11 project template add a new SceneDelegate.swift file in the project, and the SceneDelegate class manage the iOS app’s UI life cycle. And in Xcode 11, the template remove the window member variable ( UIKit.UIWindow type ) from AppDelegate class, it add the window member variable to the SceneDelegate class. So your code must be placed in below SceneDelegate class’s function func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) Remove the "return true" part |
|
|
|
|
|
|
|
Thank you, i try this like 4 ours and found this, the best answer i find and it worked |
|
GO FURTHER, FASTER Unleash your full potential as a Swift developer with the all-new Swift Career Accelerator: the most comprehensive, career-transforming learning resource ever created for iOS development. Whether you’re just starting out, looking to land your first job, or aiming to become a lead developer, this program offers everything you need to level up – from mastering Swift’s latest features to conquering interview questions and building robust portfolios.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.