故事板中的 Paintcode 样式包

Paintcode stylekit in storyboard

我用 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

为了在情节提要中使用它,我添加了一个对象并将自定义 Class 设置为我的样式包。我添加了一个 ImageView,右键单击我的 stylekit 进行拖动,但是..我没有找到 Outlet Collections,难道我不能在这里使用我的绘图方法吗?

我做错了什么?

Outlet Collection 仅适用于 没有参数的画布

你有:

+ (UIImage*)imageOfSpalshWithFrame: (CGRect)frame;

成功:

+ (UIImage*)imageOfSpalsh;