objective c - Open ViewController right after viewDidLoad without .xib file -


I am working with the storyboard, as far as I know that I have not found the file what I want to do I: When the app launches, I want to see that the DB has been written in the last few days and if not, then open a scene which is not a standard view. (Because if DB is not empty then another view should be opened as it is a standard view.)

How much I have tried so far: (Deedload / ViewDeepPipper in view) < Pre> View Controller * vs. [[View Controller New]; [Self present ViewController: animated vs: yes complete: zero];

It leads to a black screen that contains nothings, it just stays black. After this I tried to do a segment but it was the result of reopening it once more.

Is there a common / standard way to do this?

Thanks a lot!

In this case, you can instantiate a UIViewController instance from the storyboard example:

  UIStoryboard * Storyboard = [UIStoryboard storyboardWithName: @ "YourStoryboard" bundle: zero]; UIViewController * newController = [Storyboard Institutional Visual Control Manager];   

It assumes that you are going to start with the initial view controller inside that storyboard instance.

You can add this with your conditional to do the following:

  UIViewController * newViewController = Zero; If ([Self database base newinstance]) {UIStoryboard * Storyboard = [UIStoryboard storyboardWithName: @ "NewDataStoryboard" bundle: zero]; NewController = [Storyboard Institution Instrumental Weigh Controller]; } And {UIStoryboard * Storyboard = [UIStoryboard storyboardWithName: @ "NonudityStoreboard" bundle: zero]; NewController = [Storyboard Institution Instrumental Weigh Controller]; } // Current new view controller (this example is a navigation controller considers) [self.navigationController pushViewController: newController Animated: Yes];   

If you want to instantiate the view controller which is not the initial view controller in the storyboard, you can take advantage of another example - (id) instantiateViewControllerWithIdentifier: (NSString *) instantiateInitialViewController Identifier instead of calling

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -