变量参数枚举的更简洁语法。
- (id)initWithCancelButtonTitle:(NSString *)cancelTitle otherButtonTitles:(NSString *)otherButtonTitles, ... {
if (self = [super init]) {
NSMutableArray *buttonTitles = [[NSMutableArray alloc] init];
BRYVarArgs(^(NSString *title) {
[buttonTitles addObject:title];
}, otherButtonTitles);
}
return self;
}
可在 MIT 许可证下使用: http://bryan.mit-license.org