shanksxiao
2015-08-28 23:59:49 +08:00
typedef NS_ENUM (NSUInteger, KeyboardForMac ) {
KeyboardForMac_HHKB,
KeyboardForMac_Filco,
KeyboardForMac_Cherry,
KeyboardForMac_Poker,
KeyboardForMac_GH60,
KeyboardForMac_KBT_RACE2,
KeyboardForMac_Minila_Air,
KeyboardForMac_ErgoDox,
KeyboardForMac_Matias_Laptop
};
const NSArray *__KeyboardType;
#define KeyboardTypeArray \
(__KeyboardType ?: \
(__KeyboardType = [[NSArray alloc] initWithObjects:\
@"HHKB",\
@"Filco",\
@"Cherry",\
@"Poker",\
@"GH60",\
@"KBT_RACE2",\
@"Minila_Air",\
@"ErgoDox",\
@"Matias_Laptop",nil]))
#define KeyboardTypeString (index ) ([KeyboardTypeArray objectAtIndex:index])
//麻利麻利哄。。。
NSInteger r = arc4random () % [KeyboardTypeArray count];
NSLog (@"神说这就是你想要的: %@",KeyboardTypeString (r ));