Commit 55a9dec6 by Daniel Dahan

updated ControlView intrinsicContentSize and minor cleanups

parent e6e03bef
......@@ -218,7 +218,7 @@ public class ControlView : MaterialView {
}
public override func intrinsicContentSize() -> CGSize {
return CGSizeMake(width, 44)
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 44)
}
/**
......
......@@ -45,7 +45,7 @@ public extension UIImage {
}
let g: UIImage?
let t: CGRect = CGRectMake(0, 0, nil == w ? tw : w!, nil == h ? th : h!)
let t: CGRect = CGRectMake(0, 0, w ?? tw, h ?? th)
UIGraphicsBeginImageContextWithOptions(t.size, false, MaterialDevice.scale)
drawInRect(t, blendMode: .Normal, alpha: 1)
g = UIGraphicsGetImageFromCurrentImageContext()
......
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