Skip to content

Commit 0858e5f

Browse files
author
Daniel Dahan
committed
Fixed Grid issues, where the layout calculations were being deferred and causing inconsistencies in layouts.
1 parent 3124322 commit 0858e5f

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.1.7
2+
3+
* Fixed Grid issues, where the layout calculations were being deferred and causing inconsistencies in layouts.
4+
* Updated to [Motion 3.1.2](https://github.com/CosmicMind/Motion/releases/tag/3.1.2).
5+
16
## 3.1.6
27
- [issue-1245](https://github.com/CosmicMind/Material/issues/1245): Fixed issue where completion block was not executed when calling Switch.toggle.
38

Material.podspec

Lines changed: 1 addition & 1 deletion
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 = '3.1.6'
3+
s.version = '3.1.7'
44
s.swift_version = '5.0'
55
s.license = 'BSD-3-Clause'
66
s.summary = 'A UI/UX framework for creating beautiful applications.'

Material.xcodeproj/xcshareddata/xcschemes/Material.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1030"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Sources/Info.plist

Lines changed: 1 addition & 1 deletion
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>3.1.6</string>
18+
<string>3.1.7</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Sources/iOS/Grid/Grid.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,13 @@ public struct Grid {
216216
return
217217
}
218218

219+
/// It is important to call `setNeedsLayout` and `layoutIfNeeded`
220+
/// in order to have the parent view's `frame` calculation be set
221+
/// for `Grid` to be able to then calculate the correct dimenions
222+
/// of its `child` views.
223+
canvas.setNeedsLayout()
224+
canvas.layoutIfNeeded()
225+
219226
guard 0 < canvas.bounds.width && 0 < canvas.bounds.height else {
220227
return
221228
}

0 commit comments

Comments
 (0)