Commit 156f4984 by Daniel Dahan

progressive cleanup

parent 605728de
...@@ -49,13 +49,14 @@ public class FlatButton : MaterialButton { ...@@ -49,13 +49,14 @@ public class FlatButton : MaterialButton {
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 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(15, 1.1) self.transform = CGAffineTransformMakeScale(1.05, 1.1)
self.setTitleColor(UIColor.whiteColor(), forState: .Normal) self.setTitleColor(UIColor.whiteColor(), forState: .Normal)
}) })
} }
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
import UIKit import UIKit
public class RaisedButton : MaterialButton { public class RaisedButton : MaterialButton {
/**
:name: textColor
*/
public var textColor: UIColor?
// //
// :name: prepareButton // :name: prepareButton
// //
...@@ -45,17 +50,16 @@ public class RaisedButton : MaterialButton { ...@@ -45,17 +50,16 @@ public class RaisedButton : MaterialButton {
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 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, textColor = self.titleLabel?.textColor
animations: { UIView.animateWithDuration(0.3, animations: {
self.pulseView!.transform = CGAffineTransformMakeScale(10, 10) self.pulseView!.transform = CGAffineTransformMakeScale(10, 10)
self.transform = CGAffineTransformMakeScale(15, 1.1) self.transform = CGAffineTransformMakeScale(1.05, 1.1)
}, self.setTitleColor(UIColor.whiteColor(), forState: .Normal)
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