我用 PaintCode 创建了各种图形。当我导出时,我得到一个生成的 .m 和 .h 文件。对于我的项目,这是生成的 .h 文件:
@interface StyleKit2 : NSObject
// Colors
+ (UIColor*)black;
+ (UIColor*)mustad_blue;
+ (UIColor*)mustad_grey;
+ (UIColor*)white;
+ (UIColor*)mustad_dark_grey;
+ (UIColor*)mustad_blue_half;
// Images
+ (UIImage*)image;
// Drawing Methods
+ (void)drawHorse_shoeWithFrame: (CGRect)frame;
+ (void)drawCogsWithFrame: (CGRect)frame;
+ (void)drawHoofWithFrame: (CGRect)frame ispressed: (BOOL)ispressed;
+ (void)drawHoof_camWithFrame: (CGRect)frame ispressed: (BOOL)ispressed;
+ (void)drawOrder_folderWithFrame: (CGRect)frame;
+ (void)drawSpalshWithFrame: (CGRect)frame;
+ (void)drawHorse_shoe_2WithFrame: (CGRect)frame;
+ (void)drawMustad_square_shapeWithFrame: (CGRect)frame;
+ (void)drawGrey_hoofWithFrame: (CGRect)frame ispressed: (BOOL)ispressed;
+ (void)drawHoof_unfilledWithIspressed: (BOOL)ispressed;
// Generated Images
+ (UIImage*)imageOfSpalshWithFrame: (CGRect)frame;
@end
为了在情节提要中使用它,我添加了一个对象并将自定义类设置为我的 stylekit。我添加了一个 ImageView,右键单击我的 stylekit 进行拖动,但是.. 我没有找到 Outlet Collections,我不应该可以在这里使用我的绘图方法吗?
我究竟做错了什么?