English 中文(简体)
父母控制员的获取职能
原标题:Accessing functions in a parent controller

我在XCode为从事工作的Imi项目做了一个观察台,但我对 View眼镜师以及获得父母亲眼看管功能的最佳途径有疑问?

基本上,目前我与MenduViewController(开门)和LandViewController(开门,使LLLLES开放)。

此时,我已安装了电离交换机,控制着电离转换。 但是,在一位参与者从MenduViewController中遴选了这一级别,并在LandViewController中管理了适当的级别之后,我要说话。 我不知道没有火箭科学。

什么是要求父母履行职能的最佳途径?

最佳回答

我已经做了工作,希望分享我的调查结果。

在分观点或分观点中,你可以把以下守则作为其他地方的点子。

#import "TwoViewAppDelegate.h" // import the header of the class you want to reference


- (IBAction)setRedColor:(id)sender
{
    // Use the class name and create a pointer (in this case mainDelegate)
    TwoViewAppDelegate *mainDelegate = (TwoViewAppDelegate *)[[UIApplication sharedApplication] delegate];
    mainDelegate.textColor = [UIColor redColor];
    [mainDelegate flipToFront];
}
问题回答

你们必须创建观点控制人的母子,并在你在另一种观点中确定看法。

我不敢肯定,如果我能正确理解你的问题,但我将谈一下授权的模式。 经由上级认为控制员是被nes的观点控制人的代表,这使你能够把代表的方法从被nes的那类人上传给上级。





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签