Skip to content
/ SPButton Public
forked from SPStore/SPButton

自定义按钮,图片可在上、左、下、右,可调整图文间距,新增属性支持storyBoard/xib,系统按钮的所有属性和方法依然生效

Notifications You must be signed in to change notification settings

Lxta/SPButton

 
 

Repository files navigation

SPButton

Pod Version Pod Platform Language

安装

target 'MyApp' do
  pod 'SPButton', '~> 3.1.0'
end

如何使用

  • 创建(创建的时候就设定图片的位置,也可以之后通过属性imagePosition设置)
SPButton *button = [[SPButton alloc] initWithImagePosition:SPButtonImagePositionLeft];
  • 设置图片位置
button.imagePosition = SPButtonImagePositionTop;
  • 设置图文间距
button.imageTitleSpace = 10;

效果图

image

测试演示图(gif)

image

About

自定义按钮,图片可在上、左、下、右,可调整图文间距,新增属性支持storyBoard/xib,系统按钮的所有属性和方法依然生效

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 85.7%
  • Ruby 14.3%