I recently tried working with the MainStoryboard.storyboard within Xcode and so far It\'s going pretty good and I\'m wondering why I\'ve never used it before. While playing
You can instantiate viewcontroller in -init method.
- (instancetype)init
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
self = [storyboard instantiateViewControllerWithIdentifier:@"MyViewController"];
if(self)
{
//default initialization
}
return self;
}
and the in your custom init method
- (instancetype)initWithImages:(NSArray *)images
{
self = [self init];
if(self)
{
self.images = images;
}
return self;
}