开发者

iPhone - Using a define [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years ago.

I am a newbie on iPhone development.

I have declared开发者_如何转开发 a variable on my .m file like this

#define myFloat     60.0f

Now when I try to use this variable like

CGRect myFrame = CGRectMake(0.0f, 0.0f, myFloat, myFloat);

it says myFloat is undeclared!

How do I do that?

thanks.


Try putting the #define in the .h file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜