故事板中的Paintcode样式包

时间:2015-03-24 08:38:45

标签: ios xcode storyboard paint-code

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

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

我做错了什么?

1 个答案:

答案 0 :(得分:1)

Outlet Collection仅适用于不带参数的画布

你有:

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

成功:

+ (UIImage*)imageOfSpalsh;