Commit 1643b97a by Daniel Dahan

issue-995: Updated iOS 11 layout margins for NavigationBar.

parent c67a2a93
## 2.14.0
* [issue-995](https://github.com/CosmicMind/Material/issues/995): Updated iOS 11 layout margins for NavigationBar.
* [pr-1038](https://github.com/CosmicMind/Material/pull/1038): Merged PR for iOS 11 layout margins fix.
## 2.13.7
* Updated TabsController to no longer force the default animation to change between tabs and not return to normal behavior.
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.13.7'
s.version = '2.14.0'
s.license = 'BSD-3-Clause'
s.summary = 'A UI/UX framework for creating beautiful applications.'
s.homepage = 'http://cosmicmind.com'
......
Subproject commit 654928d706213db2cd9f71281361960177ad0c1d
Subproject commit 100bf243fd065131bd6572f4ff06993b108a8e7e
......@@ -44,7 +44,7 @@ open class NavigationBar: UINavigationBar {
}
/// A preset wrapper around contentEdgeInsets.
open var contentEdgeInsetsPreset = EdgeInsetsPreset.none {
open var contentEdgeInsetsPreset = EdgeInsetsPreset.square1 {
didSet {
contentEdgeInsets = EdgeInsetsPresetToValue(preset: contentEdgeInsetsPreset)
}
......@@ -52,7 +52,7 @@ open class NavigationBar: UINavigationBar {
/// A reference to EdgeInsets.
@IBInspectable
open var contentEdgeInsets = EdgeInsets.zero {
open var contentEdgeInsets = EdgeInsetsPresetToValue(preset: .square1) {
didSet {
layoutSubviews()
}
......@@ -67,7 +67,7 @@ open class NavigationBar: UINavigationBar {
/// A wrapper around grid.interimSpace.
@IBInspectable
open var interimSpace: InterimSpace = 0 {
open var interimSpace = InterimSpacePresetToValue(preset: .interimSpace3) {
didSet {
layoutSubviews()
}
......@@ -137,8 +137,8 @@ open class NavigationBar: UINavigationBar {
//iOS 11 added left/right layout margin in subviews of UINavigationBar
//since we do not want to unsafely access private view directly
//iterate subviews to set `layoutMargin` to zero
for view in subviews {
view.layoutMargins = .zero
for v in subviews {
v.layoutMargins = .zero
}
if let v = topItem {
......@@ -148,6 +148,7 @@ open class NavigationBar: UINavigationBar {
if let v = backItem {
layoutNavigationItem(item: v)
}
layoutDivider()
}
......@@ -163,8 +164,6 @@ open class NavigationBar: UINavigationBar {
isTranslucent = false
depthPreset = .none
contentScaleFactor = Screen.scale
contentEdgeInsetsPreset = .none
interimSpacePreset = .none
backButtonImage = Icon.cm.arrowBack
if #available(iOS 11, *) {
......
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