MARoundButton 0.1.7

MARoundButton 0.1.7

测试已测试
Lang语言 SwiftSwift
许可证 MIT
发布最后发布2016年9月
SPM支持SPM

Tyler Miller维护。



  • Tyler Miller

MARoundButton

安装

MARoundButton可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中

pod 'MARoundButton'

如何使用

MARoundButton可以通过在视图中添加UIButton并在身份检查器中选中MARoundButton作为类和模块来通过Storyboard使用。所有属性都可以在属性检查器选项卡内更改。

MARoundButton还可以像普通UIButton一样通过代码使用。只需记住设置圆形按钮属性。

Storyboard示例

StoryBoard

Swift示例

首先导入MARoundButton

import MARoundButton

然后设置一个类似于以下按钮

let btn = MARoundButton(frame: CGRect(x: 20, y: 40, width: 50, height: 50))
btn.backgroundColor = UIColor.brown
btn.setTitle("BTN", for: .normal)
btn.tintColor = UIColor.white

// MARoundButton
btn.borderColor = UIColor.black
btn.border = 2
btn.corner = 23
btn.borderAlpha = 0.5

self.view.addSubview(btn)

待办事项

  • 完成文档
  • 添加示例项目
  • 为Objective-C添加代码示例

作者

Tyler Miller

许可证

MARoundButton根据MIT许可证提供。有关更多信息,请参阅LICENSE文件。