开发者

How to save and take global variables

Please help me fix this code!:

first .m file:

NSInteger MYGlobalVariable = 0;

second .m file:

-(IBAction)globalvariable {
    if (NSIn开发者_如何转开发teger MYGlobalVariable = 0:
        [comp4nat setHidden = YES]);
}


Hard to say exactly what you art trying to do here due to many syntax problems, but here's a guess:

- (IBAction)globalVariable {
    if (MYGlobalVariable == 0)
        [comp4nat setHidden:YES];
}

I have no idea if this is what you are trying to do, but at least it should compile. If this is not what you are trying to do then you should provide more information in your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜