Search code examples
iosxcodestoryboardpaintcode

Paintcode stylekit in storyboard


I have created various graphics with PaintCode. As i export i get a generated .m and .h file. For my project this is the generated .h file:

@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

To use this in storyboard i added an object and set the Custom Class to my stylekit. I add an ImageView, rightclick my stylekit to drag, but .. i find no Outlet Collections, shouldn't i be able to use my drawing methods here?

What am i doing wrong?


Solution

  • The Outlet Collection is available only for canvases without parameters.

    You have:

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

    Make it:

    + (UIImage*)imageOfSpalsh;