object-c中的常量字符创数组

java

	public static final String STR_TITLE_STR[] = {
			"store_subtitle1","store_subtitle2", "store_subtitle3", "store_subtitle4", "store_subtitle5" };


object-c

// title
#define STR_TITLE_MAX 5
static const char* STR_TITLE_INDEX[STR_TITLE_MAX] = {
    "store_subtitle1", "store_subtitle2", "store_subtitle3", "store_subtitle4", "store_subtitle5"};

转换成NSString

NSString *str = [NSString stringWithUTF8String:STR_TITLE_INDEX[i];


你可能感兴趣的:(object-c中的常量字符创数组)