Skip to content

Commit

Permalink
samples-issue-78: Fixed iPhoneX bottomLayoutGuide constraints not pro…
Browse files Browse the repository at this point in the history
…perly being set.
  • Loading branch information
Daniel Dahan committed Oct 28, 2017
1 parent 7a6387e commit 1050a89
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.12.10

* [samples-issue-78](https://github.com/CosmicMind/Samples/issues/78): Fixed iPhoneX bottomLayoutGuide constraints not properly being set.

## 2.12.9

* Fixed breaking change to loading the TabsController.
Expand Down
2 changes: 1 addition & 1 deletion Material.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.12.9'
s.version = '2.12.10'
s.license = 'BSD-3-Clause'
s.summary = 'A UI/UX framework for creating beautiful applications.'
s.homepage = 'http://materialswift.com'
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.12.9</string>
<string>2.12.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
12 changes: 12 additions & 0 deletions Sources/iOS/TabsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@ fileprivate extension TabsController {

/// Layout the tabBar.
func layoutTabBar() {
if #available(iOS 11, *) {
if .bottom == tabBarAlignment {
let v = bottomLayoutGuide.length

if 0 < v {
tabBar.heightPreset = { tabBar.heightPreset }()
tabBar.frame.size.height += v
tabBar.grid.layoutEdgeInsets.bottom = v
}
}
}

tabBar.frame.origin.x = 0
tabBar.frame.origin.y = .top == tabBarAlignment ? 0 : view.bounds.height - tabBar.bounds.height
tabBar.frame.size.width = view.bounds.width
Expand Down

0 comments on commit 1050a89

Please sign in to comment.