Is it possible like following inverse direction?
[Normally direction of property]
@interface MainClass {
CustomClass *test1;
}
@end
@implementation MainClass
self.test1 = [[CustomClass alloc] init];
@end
[Wondering about inverse directrion of property]
Is it possible to indicate from test1 to self?
ex) like test1.myowner? or test1<-self? or test1/self or etc..
No, not really. You can’t relate from the object that is set to the object of which the proprty is set. You’ll almost certainly want to declare a property on
CustomClassalso, then in the setter ofMainClass, set the property of the instance ofCustomClasstoself.