Skip to content

Commit 499f0c7

Browse files
committed
Minor fix for the latest IOS 16 Beta
1 parent 206684e commit 499f0c7

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

ChatLayout.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'ChatLayout'
3-
s.version = '1.2.3'
3+
s.version = '1.2.4'
44
s.summary = 'Chat UI Library. It uses custom UICollectionViewLayout to provide you full control over the presentation.'
55
s.swift_version = '5.7'
66

ChatLayout/Classes/Core/CollectionViewChatLayout.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ public final class CollectionViewChatLayout: UICollectionViewLayout {
107107
contentSize = controller.contentSize(for: .beforeUpdate)
108108
} else {
109109
var size = controller.contentSize(for: .beforeUpdate)
110-
size.height += controller.totalProposedCompensatingOffset
110+
if #available(iOS 16.0, *) {
111+
if controller.totalProposedCompensatingOffset > 0 {
112+
size.height += controller.totalProposedCompensatingOffset
113+
}
114+
} else {
115+
size.height += controller.totalProposedCompensatingOffset
116+
}
111117
contentSize = size
112118
}
113119
return contentSize

Example/Podfile.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PODS:
2-
- ChatLayout (1.2.3):
3-
- ChatLayout/Ultimate (= 1.2.3)
4-
- ChatLayout/Core (1.2.3)
5-
- ChatLayout/Extras (1.2.3):
2+
- ChatLayout (1.2.4):
3+
- ChatLayout/Ultimate (= 1.2.4)
4+
- ChatLayout/Core (1.2.4)
5+
- ChatLayout/Extras (1.2.4):
66
- ChatLayout/Core
7-
- ChatLayout/Ultimate (1.2.3):
7+
- ChatLayout/Ultimate (1.2.4):
88
- ChatLayout/Core
99
- ChatLayout/Extras
1010
- DifferenceKit (1.3.0):
@@ -35,7 +35,7 @@ EXTERNAL SOURCES:
3535
:path: "../"
3636

3737
SPEC CHECKSUMS:
38-
ChatLayout: 42afa9fc45e72e3b941a9fd3e7a92b6e250a148d
38+
ChatLayout: b739a3fd0940dd36d201f31ca5315bb1d94d6c9d
3939
DifferenceKit: ab185c4d7f9cef8af3fcf593e5b387fb81e999ca
4040
FPSCounter: 884afec377de66637808c4f52ecc3b85a404732b
4141
InputBarAccessoryView: 1d7b0a672b36e370f01f264b3907ef39d03328e3

0 commit comments

Comments
 (0)