Commit 92a2303a by Daniel Dahan

Merge pull request #394 from mohpor/development

Fixes a bug where NavigationBar would use device width as width even In foresheets (issue-386)
parents 35de162b 379e5574
......@@ -280,11 +280,11 @@ public class NavigationBar : UINavigationBar {
public override func intrinsicContentSize() -> CGSize {
switch navigationBarStyle {
case .Tiny:
return CGSizeMake(MaterialDevice.width, 32)
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 32)
case .Default:
return CGSizeMake(MaterialDevice.width, 44)
return CGSizeMake(superview?.bounds.width ?? MaterialDevice.width, 44)
case .Medium:
return CGSizeMake(MaterialDevice.width, 56)
return CGSizeMake(superview?.bounds.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