Commit e0f8187c by Daniel Dahan

progressive cleanup

parent 5bf12299
...@@ -24,27 +24,6 @@ public class FabButton : MaterialButton { ...@@ -24,27 +24,6 @@ public class FabButton : MaterialButton {
*/ */
public var lineWidth: CGFloat = 2.0 public var lineWidth: CGFloat = 2.0
/**
:name: init
*/
public required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
/**
:name: init
*/
public required init(frame: CGRect) {
super.init(frame: frame)
}
/**
:name: init
*/
public convenience init() {
self.init(frame: CGRectZero)
}
// //
// :name: prepareButton // :name: prepareButton
// //
...@@ -57,22 +36,22 @@ public class FabButton : MaterialButton { ...@@ -57,22 +36,22 @@ public class FabButton : MaterialButton {
// //
// :name: pulseTouches // :name: pulseTouches
// //
// public override func pulseTouches(touches: Set<NSObject>) { internal override func pulseTouches(touches: Set<NSObject>) {
// super.pulseTouches(touches) super.pulseTouches(touches)
// let touch = touches.first as! UITouch let touch = touches.first as! UITouch
// let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
// pulseView = UIView() pulseView = UIView()
// pulseView!.frame = CGRectMake(0, 0, bounds.width, bounds.height) pulseView!.frame = CGRectMake(0, 0, bounds.width, bounds.height)
// pulseView!.layer.cornerRadius = bounds.width / 2.0 pulseView!.layer.cornerRadius = bounds.width / 2.0
// pulseView!.center = touchLocation pulseView!.center = touchLocation
// pulseView!.backgroundColor = pulseColor?.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor?.colorWithAlphaComponent(0.5)
// backgroundColorView.addSubview(pulseView!) backgroundColorView.addSubview(pulseView!)
// UIView.animateWithDuration(0.3, UIView.animateWithDuration(0.3,
// animations: { animations: {
// self.pulseView!.transform = CGAffineTransformMakeScale(3, 3) self.pulseView!.transform = CGAffineTransformMakeScale(3, 3)
// self.transform = CGAffineTransformMakeScale(1.1, 1.1) self.transform = CGAffineTransformMakeScale(1.1, 1.1)
// }, },
// completion: nil completion: nil
// ) )
// } }
} }
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
import UIKit import UIKit
public class FlatButton : MaterialButton { public class FlatButton : MaterialButton {
/**
:name: textColor
*/
public var textColor: UIColor? public var textColor: UIColor?
// //
...@@ -32,21 +35,20 @@ public class FlatButton : MaterialButton { ...@@ -32,21 +35,20 @@ public class FlatButton : MaterialButton {
// //
// :name: pulseTouches // :name: pulseTouches
// //
// public override func pulseTouches(touches: Set<NSObject>) { internal override func pulseTouches(touches: Set<NSObject>) {
// super.pulseTouches(touches) super.pulseTouches(touches)
// let touch = touches.first as! UITouch let touch = touches.first as! UITouch
// let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
// pulseView = UIView() pulseView = UIView()
// pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height) pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height)
// pulseView!.layer.cornerRadius = bounds.height / 2.0 pulseView!.layer.cornerRadius = bounds.height / 2.0
// pulseView!.center = touchLocation pulseView!.center = touchLocation
// pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5)
// backgroundColorView.addSubview(pulseView!) backgroundColorView.addSubview(pulseView!)
// textColor = self.titleLabel?.textColor UIView.animateWithDuration(0.3, animations: {
// UIView.animateWithDuration(0.3, animations: { self.pulseView!.transform = CGAffineTransformMakeScale(10, 10)
// self.pulseView!.transform = CGAffineTransformMakeScale(10, 10) self.transform = CGAffineTransformMakeScale(1.05, 1.1)
// self.transform = CGAffineTransformMakeScale(1.05, 1.1) self.setTitleColor(UIColor.whiteColor(), forState: .Normal)
// self.setTitleColor(.whiteColor(), forState: .Normal) })
// }, completion: nil) }
// }
} }
...@@ -31,23 +31,23 @@ public class RaisedButton : MaterialButton { ...@@ -31,23 +31,23 @@ public class RaisedButton : MaterialButton {
// //
// :name: pulseTouches // :name: pulseTouches
// //
// public override func pulseTouches(touches: Set<NSObject>) { internal override func pulseTouches(touches: Set<NSObject>) {
// super.pulseTouches(touches) super.pulseTouches(touches)
// let touch = touches.first as! UITouch let touch = touches.first as! UITouch
// let touchLocation = touch.locationInView(self) let touchLocation = touch.locationInView(self)
// pulseView = UIView() pulseView = UIView()
// pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height) pulseView!.frame = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.height)
// pulseView!.layer.cornerRadius = bounds.height / 2.0 pulseView!.layer.cornerRadius = bounds.height / 2.0
// pulseView!.center = touchLocation pulseView!.center = touchLocation
// pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5) pulseView!.backgroundColor = pulseColor!.colorWithAlphaComponent(0.5)
// backgroundColorView.addSubview(pulseView!) backgroundColorView.addSubview(pulseView!)
// UIView.animateWithDuration(0.3, UIView.animateWithDuration(0.3,
// animations: { animations: {
// self.pulseView!.transform = CGAffineTransformMakeScale(10, 10) self.pulseView!.transform = CGAffineTransformMakeScale(10, 10)
// self.transform = CGAffineTransformMakeScale(1.05, 1.1) self.transform = CGAffineTransformMakeScale(1.05, 1.1)
// }, },
// completion: nil completion: nil
// ) )
// } }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment