a
How can I use cached image from StyleKit to customize my UIButton/UIImageView or object that responds to setImage: or setSelectedImage: messages?

How can I use cached image from StyleKit to customize my UIButton/UIImageView or object that responds to setImage: or setSelectedImage: messages?

StyleKit provides methods that return cached NSImage/UIImage (such method begins with imageOf prefix) and IBOutletCollection properties that can be used to customize multiple objects that respond to setImage(_:) or setSelectedImage(_:) messages (Objective-C: setImage: or setSelectedImage: ).

If imageOf... method is generated without any other parameters, size of image equals to size of its canvas.

Please read how to generate an image with custom size at runtime.

Please, check out the example project: