ExBen
ExBen

Reputation: 185

What's the difference between instantiateInitialViewController and instantiateViewControllerWithIdentifier:?

If I have a storyboard whose viewcontroller has been tagged. then What's the difference between these 2 APIs?

What I want to know is whether there is some difference on returned object. are they exactly same or one of them will initialize more things?

Upvotes: 1

Views: 1574

Answers (1)

meda
meda

Reputation: 45500

Use instantiateInitialViewController: to instatiate the default view (initial), this is something you wouldn't do programmatically usually

Use instantiateViewControllerWithIdentifier: when you would like a ViewController And attach a view from the storyboard (storyboard Id (Identifier))

Upvotes: 1

Related Questions