solarenqu
solarenqu

Reputation: 814

Missing storyboard

I had a storyboard based application. I deleted the storyboard because I don't need it.

Now when I build my project to simulator it's running but when I try to deploy to a real device it throws this:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle (loaded)'

I don't want to use storyboard.. where does it try to load "Main" storyboard? where could I remove it?

UPDATE:

 var window: UIWindow?
    var mainNavigationController: UINavigationController?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        self.mainNavigationController = UINavigationController()
        var mainController: UIViewController? = TineLineViewController()
        self.mainNavigationController!.pushViewController(mainController!, animated: false)
        self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
        self.window!.rootViewController = mainController
        self.window!.makeKeyAndVisible()

Thank you now i update my AppDelagate didFinishLaunchingWithOptions method. The main controller screen is shows up but i have a UISwipeGestureRecognizer which not handling my request.. this is my UISwipeGestureRecognizer:

        let postLeft : Selector = "postLeft:"
        let postLeftSwipe = UISwipeGestureRecognizer(target: self, action: postLeft)
        postLeftSwipe.direction = UISwipeGestureRecognizerDirection.Left
        goToPostButton.addGestureRecognizer(postLeftSwipe)

should i change something?

Thank you!

Upvotes: 0

Views: 69

Answers (1)

nburk
nburk

Reputation: 22751

  1. first remove the appropriate line from your app's info plist file
  2. put the code to instantiate your initial view controller into your app delegate's application:didFinishLaunching: and set the view controller as the rootViewController of your application's main UIWindow object (or embed it into a UINavigationController or UITabBarController which again you can set as rootViewController of the UIWindow). find the code how to do this here :)

Upvotes: 1

Related Questions