Skip to content

jianghongbing/JHBLayoutableButton

Repository files navigation

JHBLayoutableButton

a subclass of UIButton, which support to custom layout button' image view and title label.

4 layout style support

  • image view top, title label bottom
  • image view bottom, title label top
  • image view left, title label right
  • image view right, title label left

Installation

  • drag source file into your project
  • use Cocoapods pod 'JHBLayoutableButton', '~> 0.0.2'

Usage

import UIButton+JHBLayoutableButton.h file

UIButton *button = [UIButton buttonWithLayoutStyle:JHBLayoutableButtonStyleIRTL spaceBetweenImageAndTitle:3.0];

Requirements

  • iOS 7.0 or later

License

MIT

About

Custom layout UIButton's imageView and titleLabel

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published