Latest 1.01
Homepage https://github.com/filipstefansson/UITintedButton
License MIT
Platforms ios 7.0
Authors

Ever wanted to tint a UIButton like you do with a UIBarButtonItem or a UINavigationItem? Here you go!

UITintedButton

This category adds two instance methods and two class methods to UIButton:

-(void)setImageTintColor:(UIColor *)color forState:(UIControlState)state;
-(void)setBackgroundTintColor:(UIColor *)color forState:(UIControlState)state;

+(void)tintButtonImages:(NSArray *)buttons withColor:(UIColor *)color forState:(UIControlState)state;
+(void)tintButtonBackgrounds:(NSArray *)buttons withColor:(UIColor *)color forState:(UIControlState)state;

Installation

CocoaPods

pod 'UITintedButton'

Manual

Drag UIButton+tintImage.h and UIButton+tintImage.m.

Usage

#import UIButton+tintImage.h

// Tint single buttons
 forState:UIControlStateNormal];
 forState:UIControlStateNormal];

// Tint multiple buttons
[UIButton tintButtonImages:@[button1, button2, button3] withColor:[UIColor redColor] forState:UIControlStateNormal];
[UIButton tintButtonBackgrounds:@[button1, button2, button3] withColor:[UIColor redColor] forState:UIControlStateNormal];

Latest podspec

{
    "name": "UITintedButton",
    "version": "1.01",
    "summary": "Category for UIButton to tint the image or background.",
    "homepage": "https://github.com/filipstefansson/UITintedButton",
    "screenshots": "https://dl.dropboxusercontent.com/u/958499/uitintedbutton.png?dl=0",
    "license": "MIT",
    "authors": {
        "Filip Stefansson": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/filipstefansson/UITintedButton.git",
        "tag": "1.01"
    },
    "source_files": "UIButton+tintImage.{h,m}"
}

Pin It on Pinterest

Share This