Commit 8b825830 by Daniel Dahan

autolayout adjustments made for convenience

parent d01fc27f
......@@ -99,7 +99,6 @@ public class MaterialButton : UIButton {
:name: drawRect
*/
final public override func drawRect(rect: CGRect) {
prepareContext(rect)
prepareBackgroundColorView()
prepareButton()
}
......@@ -152,18 +151,6 @@ public class MaterialButton : UIButton {
}
//
// :name: prepareContext
//
private func prepareContext(rect: CGRect) {
let context = UIGraphicsGetCurrentContext()
CGContextSaveGState(context);
CGContextAddEllipseInRect(context, rect)
CGContextSetFillColorWithColor(context, MaterialTheme.clear.color.CGColor)
CGContextFillPath(context)
CGContextRestoreGState(context);
}
//
// :name: prepareBackgroundColorView
//
private func prepareBackgroundColorView() {
......
......@@ -25,6 +25,7 @@ public class NavigationViewController: UIViewController {
public var titleLabel: UILabel? {
didSet {
if let v = titleLabel {
v.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(v)
}
}
......@@ -36,6 +37,7 @@ public class NavigationViewController: UIViewController {
public var leftButton: FlatButton? {
didSet {
if let v = leftButton {
v.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(v)
}
}
......@@ -47,6 +49,7 @@ public class NavigationViewController: UIViewController {
public var rightButton: FlatButton? {
didSet {
if let v = rightButton {
v.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(v)
}
}
......
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