How to reference object values from subview?
- by Frank Martin
I have a ViewController and add programmatically a subview.
During the initialization of the subview (initWithFrame) i want to set some attributes to values according to attributes that belong to another ViewControllers Child-Object (not a view).
-(id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// The following is kind of what i want
self.myAttribute = [self.viewController.otherObject otherValue];
}
return self;
}
Thanks in advance for any answers and comments how to improve the question.
Frank