iOS extern 和 #define 使用

Easiest way:

// Prefs.h#define PREFS_MY_CONSTANT @"prefs_my_constant"

Better way:

// Prefs.hexternNSString*const PREFS_MY_CONSTANT;// Prefs.mNSString*const PREFS_MY_CONSTANT =@"prefs_my_constant";



http://stackoverflow.com/questions/538996/constants-in-objective-c
posted @ 2014-01-03 17:11  cocoajin  阅读(383)  评论(0编辑  收藏  举报