Commit 2b3fa494 by Daniel Dahan

issue-436: fixed width issue when using dynamic intrinsicContentSize

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