Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

instantiateInitialViewController(withIdentifier: String) does not exist?

Tags:

ios

swift3

Here is a screenshot from Xcode 8.2:

enter image description here

If the function does not exist, how do you add identifier to a view controller these days?

like image 577
qed Avatar asked Jan 04 '23 21:01

qed


1 Answers

Use instead instantiateViewController(withIdentifier:) when you would like a ViewController and attach a view from the storyboard (UIStoryboard Id Identifier)

instantiateInitialViewController() is to instantiate the default view initial, this function takes no argument and is something you wouldn't usually do programmatically.

like image 175
jrbedard Avatar answered Feb 02 '23 01:02

jrbedard