How to reference object values from subview?
Posted
by Frank Martin
on Stack Overflow
See other posts from Stack Overflow
or by Frank Martin
Published on 2010-03-14T15:54:45Z
Indexed on
2010/03/14
16:05 UTC
Read the original article
Hit count: 229
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
© Stack Overflow or respective owner