ios - Downcast/Upcast a View Controller From Storyboard -
if have storyboard contains view controller named "abcviewcontroller"
"a_viewcontroller" subclass of "abcviewcontroller"
is there way initiate view controller "abcviewcontroller" storyboard "a_viewcontroller" ?
you can't storyboard. instantiateviewcontrollerwithidentifier return instance of abcviewcontroller, can cast superclass (i.e.uiviewcontroller) casting subclass (a_viewcontroller) won't work. can read why can't here.
if want have 2 view controllers same layout, different classes should use xib
Comments
Post a Comment