Latest 1.0.0
Homepage https://github.com/kam800/KBTemplateImage
License MIT
Platforms ios 5.0, requires ARC
Frameworks CoreGraphics
Authors

KBTemplateImage uses alpha channel of one image, to generate many color tinted images. Use it when you can not use UIImageRenderingModeAlwaysTemplate.

Tinted images from a template

Watch it live:

Live demo

Usage

Simple to use and reuse:

UIImage *alphaImage = [UIImage imageNamed:@"icon"];
KBTemplateImage *templateImage = [KBTemplateImage templateImageWithAlphaOfImage:alphaImage];

// make tinted images
UIImage *tintedImage = [templateImage imageTintedWithColor:[UIColor greenColor]];

// use tinted images for different button states
]
        forState:UIControlStateNormal];
]
        forState:UIControlStateHighlighted];

Installation

Copy Classes/KBTemplateImage.h and Classes/KBTemplateImage.h to your project.

Latest podspec

{
    "name": "KBTemplateImage",
    "version": "1.0.0",
    "summary": "KBTemplateImage is the only solution for tinting images when UIImageRenderingModeAlwaysTemplate is not accessible.",
    "description": "                   KBTemplateImage uses alpha channel of one image, to generate many color tinted images. Use it when you can not use UIImageRenderingModeAlwaysTemplate.n",
    "homepage": "https://github.com/kam800/KBTemplateImage",
    "screenshots": [
        "https://raw.githubusercontent.com/kam800/KBTemplateImage/master/Screens/clouds.png",
        "https://raw.githubusercontent.com/kam800/KBTemplateImage/master/Screens/demo_live.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kamil Borzym": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/kam800/KBTemplateImage.git",
        "tag": "1.0.0"
    },
    "source_files": "Classes/*.{h,m}",
    "frameworks": "CoreGraphics",
    "requires_arc": true
}

Pin It on Pinterest

Share This