Commit 759d1b63 by Daniel Dahan

development: fixed issue-613

parent 543c6864
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '2.3.19' s.version = '2.3.20'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.' s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.'
s.homepage = 'http://materialswift.com' s.homepage = 'http://materialswift.com'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.3.19</string> <string>2.3.20</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -204,6 +204,8 @@ public struct Grid { ...@@ -204,6 +204,8 @@ public struct Grid {
} }
} }
canvas.layoutIfNeeded()
guard 0 < canvas.width && 0 < canvas.height else { guard 0 < canvas.width && 0 < canvas.height else {
return return
} }
......
...@@ -309,10 +309,6 @@ extension CALayer { ...@@ -309,10 +309,6 @@ extension CALayer {
/// Manages the layout for the shape of the view instance. /// Manages the layout for the shape of the view instance.
open func layoutShape() { open func layoutShape() {
guard 0 < width, 0 < height else {
return
}
if .none != shapePreset { if .none != shapePreset {
if width < height { if width < height {
frame.size.width = height frame.size.width = height
......
...@@ -425,7 +425,8 @@ open class NavigationDrawerController: RootController { ...@@ -425,7 +425,8 @@ open class NavigationDrawerController: RootController {
} }
/// Layout subviews. /// Layout subviews.
open override func layoutSubviews() { open override func layoutSubviews() {
super.layoutSubviews()
toggleStatusBar() toggleStatusBar()
if let v = leftView { if let v = leftView {
......
...@@ -31,26 +31,6 @@ ...@@ -31,26 +31,6 @@
import UIKit import UIKit
open class RootController: UIViewController { open class RootController: UIViewController {
/// Device status bar style.
open var statusBarStyle: UIStatusBarStyle {
get {
return Application.statusBarStyle
}
set(value) {
Application.statusBarStyle = value
}
}
/// Device visibility state.
open var isStatusBarHidden: Bool {
get {
return Application.isStatusBarHidden
}
set(value) {
Application.isStatusBarHidden = value
}
}
/** /**
A Boolean property used to enable and disable interactivity A Boolean property used to enable and disable interactivity
with the rootViewController. with the rootViewController.
......
...@@ -49,18 +49,33 @@ extension UIViewController { ...@@ -49,18 +49,33 @@ extension UIViewController {
} }
open class StatusBarController: RootController { open class StatusBarController: RootController {
/// A reference to the statusBar. /// Device status bar style.
open let statusBar = UIView() open var statusBarStyle: UIStatusBarStyle {
get {
/// A boolean that indicates to hide the statusBar on rotation. return Application.statusBarStyle
open var shouldHideStatusBarOnRotation = true }
set(value) {
Application.statusBarStyle = value
}
}
open override var isStatusBarHidden: Bool { /// Device visibility state.
didSet { open var isStatusBarHidden: Bool {
get {
return Application.isStatusBarHidden
}
set(value) {
Application.isStatusBarHidden = value
statusBar.isHidden = isStatusBarHidden statusBar.isHidden = isStatusBarHidden
} }
} }
/// A boolean that indicates to hide the statusBar on rotation.
open var shouldHideStatusBarOnRotation = true
/// A reference to the statusBar.
open let statusBar = UIView()
/** /**
To execute in the order of the layout chain, override this To execute in the order of the layout chain, override this
method. LayoutSubviews should be called immediately, unless you method. LayoutSubviews should be called immediately, unless you
......
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