53
loading...
This website collects cookies to deliver better user experience
Easy to use, Storyboard is designed for creating UIs quickly and easily. Storyboard uses a drag-and-drop mechanism to build the UI.
Great for prototyping, You may have no time to build UI with code. Here, Storyboard comes to the rescue to help you build your UI many times faster than coding.
Makes code review harder, Storyboard generates XML code when you make UI changes in your Storyboard files. XML code generated by Storyboard is harder to read and it makes the code review process much harder than without Storyboard files.
Hard to refactor, At the time you might have to refactor your UITableViewController
into UICollectionViewController
or from one view controller type into a different view controller type, it’s hard to solve if you use Storyboard because you need to delete the entire view controller you want to change and this is risky.
Main.storyboard
file, if the Xcode shows the option to remove let’s select Move to Trash.SceneDelegate.swift
file and change the body of the scene
method onto code like belowvar window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
let viewController = ViewController()
let navigationController = UINavigationController(rootViewController: viewController)
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
}
Info.plist
file and remove Storyboard Name
and Main storyboard file base name
properties.