Commit 2b3fa494 by Daniel Dahan

issue-436: fixed width issue when using dynamic intrinsicContentSize

parent fb613360
......@@ -218,7 +218,7 @@ public class ControlView : MaterialView {
}
public override func intrinsicContentSize() -> CGSize {
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 44)
return CGSizeMake(width, 44)
}
/**
......
......@@ -290,11 +290,11 @@ public class NavigationBar : UINavigationBar {
public override func intrinsicContentSize() -> CGSize {
switch navigationBarStyle {
case .Tiny:
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 32)
return CGSizeMake(width ?? MaterialDevice.width, 32)
case .Default:
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 44)
return CGSizeMake(width ?? MaterialDevice.width, 44)
case .Medium:
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 56)
return CGSizeMake(width ?? MaterialDevice.width, 56)
}
}
......
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