Latest 0.0.1
Homepage https://github.com/TinyQ/TQEasyIconButton
License MIT
Platforms ios , requires ARC
Frameworks UIKit
Authors

TQEasyIconButton is a UIButton Category. Easy way to set titleEdgeInsets,imageEdgeInsets make icon in left,right,top,bottom.

Demo

image

Installation

lib is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TQEasyIconButton"

Usage

  1. Set icon & title for button.

    
    [self.demoButton setTitle:@"Button" forState:UIControlStateNormal];
    [self.demoButton setImage:@"icon" forState:UIControlStateNormal];
    
  2. Set icon left,title right

    image

    
    [self.demoButton setIconInLeft];
    // or
    //[self.demoButton setIconInLeftWithSpacing:0];
    

    image

    
    [self.demoButton setIconInRight];
    // or
    //[self.demoButton setIconInRightWithSpacing:0];
    

    image

    
    [self.demoButton setIconInBottom];
    // or
    //[self.demoButton setIconInBottomWithSpacing:0];
    

    image

    
    [self.demoButton setIconInTop];
    // or
    //[self.demoButton setIconInTopWithSpacing:0];
    

Latest podspec

{
    "name": "TQEasyIconButton",
    "version": "0.0.1",
    "summary": "TQEasyIconButton is a UIButton Category. Easy way to set titleEdgeInsets,imageEdgeInsets make icon in left,right,top,bottom.",
    "homepage": "https://github.com/TinyQ/TQEasyIconButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "qfu": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/TinyQ/TQEasyIconButton.git",
        "tag": "0.0.1"
    },
    "source_files": "UIButton+TQEasyIcon/*.{h,m}",
    "public_header_files": "UIButton+TQEasyIcon/*.{h}",
    "requires_arc": true,
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This