我想扩展UIButton
一些NSString
元信息。我怎么能这样做?
我从这个开始:
@interface UIButton (neoUtils)
+ (UIButton *)neoName:(NSString *)buttonName;
@end
还有他们
#import "UIButton+NAME.h"
@implementation UIButton (neoUtils)
+ (UIButton *)neoName:(NSString *)buttonName {
UIButton *button = [UIButton neoName:buttonName];
NSLog(@"%@",button);
return button;
}
@end
这是在正确的道路上吗?如果是这样 - 我怎么可能使用它?