PrettyButtons
PrettyButtons 是一个用于创建对用户触摸有响应的动画 UIButtons 的 pod。
安装
-
安装 CocoaPods
-
将此仓库添加到您的
Podfile
target 'Example' do # IMPORTANT: Make sure use_frameworks! is included at the top of the file use_frameworks! pod 'PrettyButtons' end
-
在终端中从 podfile 目录运行
pod install
-
打开 CocoaPods 创建的
.xcworkspace
-
完成!
示例
示例项目显示了如何创建上述演示。
要运行示例项目,请克隆仓库,然后首先从 Example 目录中运行 pod install
。
初始化
PrettyButtons 可以通过以下任何方法进行初始化
init(style: OverlayStyle = .none)
init(frame: CGRect, style: OverlayStyle = .none)
init(coder aDecoder: NSCoder)
其中 OverlayStyles 定义为
enum OverlayStyle: Int {
case none = 0
case slide = 1
case bloom = 2
case fade = 3
}
作者
Chris Perkins
BeautifulButtons可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。