Autolayout and navigation - Navigation

10 important questions on Autolayout and navigation - Navigation

Whats a segue?

a transition from 1 to another mvc

If you have a push segue of 2 view controllers they go into a ...controller

Navigation

How can you embed 2 vie controllers into a navigation controller?

Go Editor > Embed In > navigation controller
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

Where are the toolbar items "stored" ?

In the view controller

Does a view controller "know" its in a navigatioController?

Yes it does, you can access it by: self.navigationController

How can you pop off a view controller?

[self.navigationController popViewControllerAnimated:YES]

How can you perform a segue from code?

[self performGeugueWithIdentifier:@"SomeSegueName" sender:self];

Why would you want a conditional segue?

When something must be shown depending on the users input..

 To whom is the message "prepareForSegue:sender:" sent?

To the view controller the segue is initiated from. You can prepare the view controller who soon will be on screen. You can set properties.

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 
{
  if([segue.identifier isEqualtoString:@"DoSomething"[) {   
    UIViewController *newController = segue.destinationViewController;
    newController.someProperty = @"wow this is quite cool";
  }
}

Can you instantiate a view controller from code?

Yes you can

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo