感谢先进。 我想知道我是否可以调用detailViewController方法或者从我创建的另一个rootViewController获取在类中声明为IBOutlets的属性。让我解释一下:
我有rootControlViews的这个层次结构:
[RootViewController的] [单元1] - > [Cell1RootViewController](将Cell1RootView推送到navController中)
只有1个带有IBOutlet声明对象(和synthethised)的DetailViewController称为“对象”
我选择[Cell 1],所以我现在在Cell1RootViewController里面。如何从这里调用DetailViewController中声明的“对象”?
我已经尝试在Cell1RootViewController中声明它并尝试通过引用插座将其链接到DetailViewController内部的那个,但我不能没有成功...
谢谢大家!
答案 0 :(得分:2)
- (id) initWithMasterView: (MasterView *) theMaster, ....otherOptionsYouWant{
self = [super init]
if (self){
myMasterInstance = theMaster;
//other initializations you want here
}
return self;
}
我不是编程语言的新手,但是客观C和Iphone开发中的这些东西似乎比它更复杂。