Commit a0d1e2ba by Daniel Dahan

fixed status bar issue when rotating SideNavigationViewController

parent 7d4f90e2
......@@ -125,7 +125,7 @@ class AppViewController: NavigationViewController {
titleLabel.text = "Inbox"
titleLabel.textAlignment = .Left
titleLabel.textColor = MaterialColor.white
titleLabel.font = RobotoFont.regularWithSize(17)
titleLabel.font = RobotoFont.regularWithSize(20)
// Detail label. Uncomment the code below to use a detail label.
// let detailLabel: UILabel = UILabel()
......@@ -133,6 +133,7 @@ class AppViewController: NavigationViewController {
// detailLabel.textAlignment = .Left
// detailLabel.textColor = MaterialColor.white
// detailLabel.font = RobotoFont.regularWithSize(12)
// titleLabel.font = RobotoFont.regularWithSize(17) // 17 point looks better with the detailLabel.
// navigationBarView.detailLabel = detailLabel
var image = UIImage(named: "ic_menu_white")
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.33.0'
s.version = '1.33.1'
s.license = 'BSD'
s.summary = 'Express your creativity with Material, an animation and graphics framework for Google\'s Material Design and Apple\'s Flat UI in Swift.'
s.homepage = 'http://cosmicmind.io'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.33.0</string>
<string>1.33.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -151,8 +151,7 @@ public class NavigationBarView : MaterialView {
super.layoutSubviews()
// General alignment.
switch UIDevice.currentDevice().orientation {
case .LandscapeLeft, .LandscapeRight:
if UIApplication.sharedApplication().statusBarOrientation.isLandscape {
grid.contentInset.top = 8
// TitleView alignment.
......@@ -169,7 +168,7 @@ public class NavigationBarView : MaterialView {
}
}
height = 44
default:
} else {
grid.contentInset.top = 28
// TitleView alignment.
......@@ -204,10 +203,9 @@ public class NavigationBarView : MaterialView {
}
public override func intrinsicContentSize() -> CGSize {
switch UIDevice.currentDevice().orientation {
case .LandscapeLeft, .LandscapeRight:
if UIApplication.sharedApplication().statusBarOrientation.isLandscape {
return CGSizeMake(UIScreen.mainScreen().bounds.width, 44)
default:
} else {
return CGSizeMake(UIScreen.mainScreen().bounds.width, 64)
}
}
......
......@@ -173,11 +173,10 @@ public class SearchBarView : MaterialView {
super.layoutSubviews()
// General alignment.
switch UIDevice.currentDevice().orientation {
case .LandscapeLeft, .LandscapeRight:
if UIApplication.sharedApplication().statusBarOrientation.isLandscape {
grid.contentInset.top = 8
height = 44
default:
} else {
grid.contentInset.top = 28
height = 64
}
......
......@@ -872,10 +872,9 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
private func toggleStatusBar(hide: Bool = false) {
if hideStatusBar {
// General alignment.
switch UIDevice.currentDevice().orientation {
case .LandscapeLeft, .LandscapeRight:
if UIApplication.sharedApplication().statusBarOrientation.isLandscape {
UIApplication.sharedApplication().statusBarHidden = true
default:
} else {
UIApplication.sharedApplication().statusBarHidden = opened ? true : hide
}
}
......
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