I want to create an app and set initial view controller. I did delete storyboard and don't want to use it. However, app throw me an error:
Could not find a storyboard named 'Main' in bundle NSBundle
But I did delete it for purpose. I want to create UI by code. Here is my AppDelegate:
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds)
let initialViewController = SearchViewController()
self.window?.rootViewController = initialViewController
self.window?.makeKeyAndVisible()
return true
}
}