ios - XCode 6 : error when selecting a view with its storyboard ID -


this code :

let first = self.storyboard!.instantiateviewcontrollerwithidentifier("firstview")  as! uiviewcontroller let second = self.storyboard!.instantiateviewcontrollerwithidentifier("secondview")  as! uiviewcontroller 

the first line ok. second line produces error :

unexpectedly found nil while unwrapping optional value 

i've checked using correct storyboard id 1 thousand times, have copied , pastes it, rewritten , everything. problem elsewhere.

what other parameters may cause error ?


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -