Commit fc115a33 by Daniel Dahan

development: issue-592: fixed NavigationDrawerController regression, where…

development: issue-592: fixed NavigationDrawerController regression, where transitioning the rootViewController would go behind the contentViewController
parent e6fa7abd
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '2.3.6' s.version = '2.3.7'
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.6</string> <string>2.3.7</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -415,20 +415,17 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega ...@@ -415,20 +415,17 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
prepare() prepare()
} }
/** open override func transition(to viewController: UIViewController, duration: TimeInterval = 0.5, options: UIViewAnimationOptions = [], animations: (() -> Void)? = nil, completion: ((Bool) -> Void)? = nil) {
Prepares the view instance when intialized. When subclassing, super.transition(to: viewController, duration: duration, options: options, animations: animations) { [weak self, completion = completion] (result) in
it is recommended to override the prepare method guard let s = self else {
to initialize property values and other setup operations. return
The super.prepare method should always be called immediately }
when subclassing.
*/ s.view.sendSubview(toBack: s.contentViewController.view)
open override func prepare() { completion?(result)
super.prepare() }
prepareContentViewController() }
prepareLeftView()
prepareRightView()
}
/// Layout subviews. /// Layout subviews.
open override func layoutSubviews() { open override func layoutSubviews() {
if isOpened { if isOpened {
...@@ -469,6 +466,20 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega ...@@ -469,6 +466,20 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
v.position.x = size.width + (isRightViewOpened ? -v.width : v.width) / 2 v.position.x = size.width + (isRightViewOpened ? -v.width : v.width) / 2
} }
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepare() {
super.prepare()
prepareContentViewController()
prepareLeftView()
prepareRightView()
}
/** /**
A method that is used to set the width of the leftView when A method that is used to set the width of the leftView when
......
...@@ -122,7 +122,7 @@ open class SearchBar: Bar { ...@@ -122,7 +122,7 @@ open class SearchBar: Bar {
} }
} }
} }
open override func layoutSubviews() { open override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
guard willLayout else { guard willLayout else {
......
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