If I am using interface builder to manage storyboards for my app, how can I call a custom init
selector when view / view controller instances are created?
For example if I have a view controller in a Storyboard scene, and its Custom Class is a UIViewController
subclass, with a custom initialiser, such as initWithMediaType:
, which takes an NSUInteger
as an argument, how can I specify in Interface Builder that initWithMediaType:
should be called, passing in a given argument?
If you want to specify in Interface Builder, declare mediaType
as a property in your UIViewController
subclass, and use 'User Defined Runtime Attributes'.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments