UIButton 子类:HGWActivityButton

jopen 10年前

一个UIButton子类使用自定义,内置活动指示灯。

采用Swift开发

UIButton 子类:HGWActivityButton

用法

var activityButton = HGWActivityButton(frame: CGRectMake(115, 80, 90, 90))  activityButton.backgroundColor = UIColor.orangeColor()  activityButton.setTitle("Load", forState: UIControlState.Normal)  activityButton.activityTitle = "Loading"  activityButton.rotatorColor = UIColor.darkGrayColor()  activityButton.rotatorSize = 8.0  activityButton.rotatorSpeed = 10.0  activityButton.rotatorPadding = 8.0  self.view.addSubview(activityButton)

项目主页:http://www.open-open.com/lib/view/home/1406191588539