该项目是Dribbble上按钮动画的实现。
要运行示例项目,请克隆仓库,并首先从Example目录运行pod install
。
RGSDotGridView可以通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile中
pod "RGSDotGridView"
override func viewDidLoad() {
super.viewDidLoad()
...
self.dotGridButton.layer.cornerRadius = CGRectGetWidth(self.dotGridButton.frame)/2
...
}
请尝试项目以获取完整示例。
RGSDotGridView
可以通过以下类进行自定义:
class DotGridView : UIView
var dotsDiameter: Double
var dotsColor: UIColor
func animateFull()
func animateClose()
class DotGridButton : UIButton
var dotView: DotGridView!
RGSDotGridView在MIT许可下可用。有关更多信息,请参阅LICENSE文件。