• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stopping the initial storyboard viewcontroller being created
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stopping the initial storyboard viewcontroller being created


  • Subject: Re: Stopping the initial storyboard viewcontroller being created
  • From: Cosmo Birch <email@hidden>
  • Date: Thu, 26 Nov 2015 09:24:27 -0800

If I understand correctly, simply unchecking the “Is Initial Controller” checkbox for the viewController in the Storyboard should fix your problem.

> On Nov 26, 2015, at 5:27 AM, Roland King <email@hidden> wrote:
>
> I would like to create the main viewcontroller in my applicationDidFinishLaunching:withOptions: method (iOS) instead of having the storyboard one created automatically.
>
> I’m doing this in order to change behaviour between simulator and device as the simulator doesn’t support BlueTooth, so I need to fix in a simulated version.
>
> I have the code to create the initial view controller and fix it up
>
> 		let storyboard = UIStoryboard(name: "Main", bundle: nil)
> 		self.window?.rootViewController = storyboard.instantiateInitialViewController()
> 		// make a fix to the viewcontroller here
> 		self.window?.makeKeyAndVisible()
>
> however I’ve found that standard machinery still creates one for me so I end up with two of them, possibly with the one I want on-screen, possibly not, and the first one created doesn’t do the decent thing and release itself either, so two of them persist. (I don’t understand what’s referencing it either, when I assign to the rootViewController it ought to go away but doesn’t).
>
> How do I stop the standard storyboard initial viewcontroller load so I can do it myself.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Stopping the initial storyboard viewcontroller being created (From: Roland King <email@hidden>)

  • Prev by Date: Stopping the initial storyboard viewcontroller being created
  • Next by Date: Re: Stopping the initial storyboard viewcontroller being created
  • Previous by thread: Stopping the initial storyboard viewcontroller being created
  • Next by thread: Re: Stopping the initial storyboard viewcontroller being created
  • Index(es):
    • Date
    • Thread