【发布时间】:2011-05-10 09:12:34
【问题描述】:
在我的通用应用程序的主 AppDelegate 类中,我定义了一个常量:
#define kNumerOfPages 2
在 AppDelegate_iPhone 类和 AppDelegate_iPad 类中,我可以像普通常量一样访问这个常量。示例:
switch (i) {
case ([super kNumerOfPages]):
{
NSLog(@"FinalPage");
break;
}
}
我可以作为常量访问它吗?
【问题讨论】:
标签: objective-c case constants c-preprocessor