Skip to content

Commit 1050a89

Browse files
author
Daniel Dahan
committed
samples-issue-78: Fixed iPhoneX bottomLayoutGuide constraints not properly being set.
1 parent 7a6387e commit 1050a89

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.12.10
2+
3+
* [samples-issue-78](https://github.com/CosmicMind/Samples/issues/78): Fixed iPhoneX bottomLayoutGuide constraints not properly being set.
4+
15
## 2.12.9
26

37
* Fixed breaking change to loading the TabsController.

Material.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Material'
3-
s.version = '2.12.9'
3+
s.version = '2.12.10'
44
s.license = 'BSD-3-Clause'
55
s.summary = 'A UI/UX framework for creating beautiful applications.'
66
s.homepage = 'http://materialswift.com'

Sources/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.12.9</string>
18+
<string>2.12.10</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Sources/iOS/TabsController.swift

+12
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,18 @@ fileprivate extension TabsController {
290290

291291
/// Layout the tabBar.
292292
func layoutTabBar() {
293+
if #available(iOS 11, *) {
294+
if .bottom == tabBarAlignment {
295+
let v = bottomLayoutGuide.length
296+
297+
if 0 < v {
298+
tabBar.heightPreset = { tabBar.heightPreset }()
299+
tabBar.frame.size.height += v
300+
tabBar.grid.layoutEdgeInsets.bottom = v
301+
}
302+
}
303+
}
304+
293305
tabBar.frame.origin.x = 0
294306
tabBar.frame.origin.y = .top == tabBarAlignment ? 0 : view.bounds.height - tabBar.bounds.height
295307
tabBar.frame.size.width = view.bounds.width

0 commit comments

Comments
 (0)