im having problems redefining the initialization method of my CustomViewController created in my storyboard.
now im does (in my mainViewController):
self.customViewController = [[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil] instantiateViewControllerWithIdentifier:@"CustomVC"]; self.customViewController.myObject = someObject;
and I have viewDidLoad (CustomViewController)
[self.label setText:self.myObject.someString]
This is working fine.
But is that right? Should I add my own initialization method (or override) in my CustomViewController? How to initWithObject :? I don't know how to call my own init method instead of the UIStoryboard instantiateViewControllerWithIdentifier: and im not getting calls to init and initWithNibName .
Maybe I should use: - (id)initWithCoder:(NSCoder *)decoder .
Please give me some tips!
Thank!
uiviewcontroller ios5 uistoryboard
Nicolas S Mar 18 '12 at 6:30 2012-03-18 06:30
source share