Create custome ViewController sublcass from StoryboardScene

Originator:konstantin.koval1
Number:rdar://20894163 Date Originated:11-May-2015 10:04 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.3.1 (6D1002)
Classification:Feature (New) Reproducible:Always
 
Summary:
When instantiating ViewController from Storyboard, the ViewController class can’t be changed.
It will only use the class that are set in the StoryboardScene.
I would like to be able to use subclass when instantiating ViewController from storyboard. 
Something similar to Nibs functionality.

Example: 
MyViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"MyViewController"];
// It always create a instance of MyViewController.

MySubclassViewController *viewController = [storyboard instantiateViewController:[MySubclassViewController class] withIdentifier:@"MyViewController"];
// use the same StoryboardScene but use a custom subclass as file owner. 

//Other solution
MySubclassViewController *myViewController = [[MySubclassViewController alloc] withIdentifier:@"MyViewController" storyboard:mainStoryabord];

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!