Commit 379e5574 by M. Porooshani

Fixes a bug where NavigationBar would use device width as width even in formsheets

parent 35de162b
......@@ -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