Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the proper way to use storyboards View Controllers and scene in iOS application?
    primarykey
    data
    text
    <p>I have been working on an iOS application for sometime now, and I think I am not using the View Controllers I have created properly with the storyboard file / scenes I have created for my application.</p> <p>As it stands, I have two storyboard files, one for the iPhone, and another for the iPad. In the <strong>AppDelegate</strong> implementation file there is a method called,</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions </code></pre> <p>I have been loading a ViewController from within this method to start the load process for my application.</p> <p>Since I have two storyboard files now, I sourced some conditional code to load a specific storyboard file based on the device that is running the application.</p> <p>What is the proper way to load the storyboard file?</p> <p>After I load the story board file do I initialize the root view controller?</p> <p>Once my root view controller is loaded should it load the elements specified in the root scene?</p> <p>If I choose to load another scene from the root scene by clicking on a button in the root scene should I dismiss the root scene, and load the new scene, or is the new scene a subclass of the parent scene? <em>What is the proper way to transition between scenes?</em></p> <p>Basically I have a separate view controller for every scene in my application, and I have specified a view controller associated with each scene in IB.</p> <p>Right now I have a button that can be pressed from the beginning / root scene to load another scene which is associated with another view controller. In this new scene I have a <strong>done</strong> button which segues back to the root view controller.</p> <p>If I were click these two buttons repeatedly by clicking on the buttons over and over, am I creating new objects of my view controllers or I am reusing the objects that were already created?</p> <p>I know this is more than one question but I am trying to get a good grasp on view lifecycles, and how view controllers relate to scenes, and the proper way to load the first view controller, which should load the first scene in an application I presume.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload