Skip to content

Commit d283fa7

Browse files
committed
Fixed typo
1 parent b7ca2a5 commit d283fa7

File tree

71 files changed

+159
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+159
-159
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 = '0.2.1'
3+
s.version = '0.2.2'
44
s.summary = 'An alternative solution to MessageKit. It uses custom UICollectionViewLayout to provide you full control over the presentation.'
55
s.swift_version = '5.2'
66

ChatLayout/Classes/Core/ChatLayout.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import UIKit
1818
///
1919
/// `ChatLayout.settings`
2020
///
21-
/// `ChatLayout.keepContentOffestAtBottomOnBatchUpdates`
21+
/// `ChatLayout.keepContentOffsetAtBottomOnBatchUpdates`
2222
///
2323
/// `ChatLayout.visibleBounds`
2424
///
@@ -60,7 +60,7 @@ public final class ChatLayout: UICollectionViewLayout {
6060
/// **NB:**
6161
/// Keep in mind that if during the batch content inset changes also (e.g. keyboard frame changes), `ChatLayout` will usually get that information after
6262
/// the animation starts and wont be able to compensate that change too. It should be done manually.
63-
public var keepContentOffestAtBottomOnBatchUpdates: Bool = false
63+
public var keepContentOffsetAtBottomOnBatchUpdates: Bool = false
6464

6565
/// The width and height of the collection view’s contents.
6666
public override var collectionViewContentSize: CGSize {
@@ -362,7 +362,7 @@ public final class ChatLayout: UICollectionViewLayout {
362362
public override func prepare(forAnimatedBoundsChange oldBounds: CGRect) {
363363
guard let collectionView = collectionView,
364364
oldBounds.width != collectionView.bounds.width,
365-
keepContentOffestAtBottomOnBatchUpdates,
365+
keepContentOffsetAtBottomOnBatchUpdates,
366366
controller.contentHeight(at: state).rounded() > visibleBounds.height.rounded() else {
367367
return
368368
}
@@ -419,7 +419,7 @@ public final class ChatLayout: UICollectionViewLayout {
419419
let isAboveBottomEdge = originalAttributes.frame.minY.rounded() <= visibleBounds.maxY.rounded()
420420

421421
if heightDifference != 0,
422-
(keepContentOffestAtBottomOnBatchUpdates && controller.contentHeight(at: state).rounded() + heightDifference > visibleBounds.height.rounded())
422+
(keepContentOffsetAtBottomOnBatchUpdates && controller.contentHeight(at: state).rounded() + heightDifference > visibleBounds.height.rounded())
423423
|| isUserInitiatedScrolling || isAnimatedBoundsChange,
424424
isAboveBottomEdge {
425425
context.contentOffsetAdjustment.y += heightDifference
@@ -536,7 +536,7 @@ public final class ChatLayout: UICollectionViewLayout {
536536
public override func finalizeCollectionViewUpdates() {
537537
controller.proposedCompensatingOffset = 0
538538

539-
if keepContentOffestAtBottomOnBatchUpdates,
539+
if keepContentOffsetAtBottomOnBatchUpdates,
540540
controller.contentHeight(at: state).rounded() > visibleBounds.height.rounded(),
541541
controller.batchUpdateCompensatingOffset != 0,
542542
let collectionView = collectionView {
@@ -601,7 +601,7 @@ public final class ChatLayout: UICollectionViewLayout {
601601
if controller.deletedIndexes.contains(itemIndexPath) || controller.deletedSectionsIndexes.contains(itemIndexPath.section) {
602602
attributes = controller.itemAttributes(for: itemIndexPath, kind: .cell, at: .beforeUpdate) ?? ChatLayoutAttributes(forCellWith: itemIndexPath)
603603
controller.offsetByTotalCompensation(attributes: attributes, for: state, backward: false)
604-
if keepContentOffestAtBottomOnBatchUpdates,
604+
if keepContentOffsetAtBottomOnBatchUpdates,
605605
controller.contentHeight(at: state).rounded() > visibleBounds.height.rounded(),
606606
let attributes = attributes {
607607
attributes.frame = attributes.frame.offsetBy(dx: 0, dy: attributes.frame.height / 2)

ChatLayout/Classes/Core/Model/StateController.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protocol ChatLayoutRepresentation: AnyObject {
2626

2727
var adjustedContentInset: UIEdgeInsets { get }
2828

29-
var keepContentOffestAtBottomOnBatchUpdates: Bool { get }
29+
var keepContentOffsetAtBottomOnBatchUpdates: Bool { get }
3030

3131
func numberOfItems(inSection section: Int) -> Int
3232

@@ -563,7 +563,7 @@ final class StateController {
563563
}
564564

565565
func offsetByTotalCompensation(attributes: UICollectionViewLayoutAttributes?, for state: ModelState, backward: Bool = false) {
566-
guard collectionLayout.keepContentOffestAtBottomOnBatchUpdates,
566+
guard collectionLayout.keepContentOffsetAtBottomOnBatchUpdates,
567567
state == .afterUpdate,
568568
let attributes = attributes else {
569569
return
@@ -735,7 +735,7 @@ final class StateController {
735735
}
736736

737737
private func compensateOffsetIfNeeded(for indexPath: IndexPath, kind: ItemKind, action: CompensatingAction) {
738-
guard collectionLayout.keepContentOffestAtBottomOnBatchUpdates else {
738+
guard collectionLayout.keepContentOffsetAtBottomOnBatchUpdates else {
739739
return
740740
}
741741
switch action {
@@ -770,7 +770,7 @@ final class StateController {
770770
}
771771

772772
private func compensateOffsetOfSectionIfNeeded(for sectionIndex: Int, action: CompensatingAction) {
773-
guard collectionLayout.keepContentOffestAtBottomOnBatchUpdates else {
773+
guard collectionLayout.keepContentOffsetAtBottomOnBatchUpdates else {
774774
return
775775
}
776776
switch action {
@@ -808,7 +808,7 @@ final class StateController {
808808
}
809809

810810
private func offsetByCompensation(frame: CGRect, indexPath: IndexPath, for state: ModelState, backward: Bool = false) -> CGRect {
811-
guard collectionLayout.keepContentOffestAtBottomOnBatchUpdates,
811+
guard collectionLayout.keepContentOffsetAtBottomOnBatchUpdates,
812812
state == .afterUpdate,
813813
contentHeight(at: .afterUpdate).rounded() > collectionLayout.visibleBounds.height.rounded() else {
814814
return frame

Example/ChatLayout/Chat/View/ChatViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ final class ChatViewController: UIViewController {
8686
chatLayout.settings.interItemSpacing = 8
8787
chatLayout.settings.interSectionSpacing = 8
8888
chatLayout.settings.additionalInsets = UIEdgeInsets(top: 8, left: 5, bottom: 8, right: 5)
89-
chatLayout.keepContentOffestAtBottomOnBatchUpdates = true
89+
chatLayout.keepContentOffsetAtBottomOnBatchUpdates = true
9090

9191
collectionView = UICollectionView(frame: view.frame, collectionViewLayout: chatLayout)
9292
view.addSubview(collectionView)

Example/Tests/BasicCalculationsTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BasicCalculationsTests: XCTestCase {
2020
lazy var visibleBounds: CGRect = CGRect(origin: .zero, size: viewSize)
2121
lazy var layoutFrame: CGRect = visibleBounds
2222
let adjustedContentInset: UIEdgeInsets = .zero
23-
let keepContentOffestAtBottomOnBatchUpdates: Bool = true
23+
let keepContentOffsetAtBottomOnBatchUpdates: Bool = true
2424

2525
func numberOfItems(inSection section: Int) -> Int {
2626
return 100

docs/Classes/CellLayoutContainerView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -458,7 +458,7 @@ <h4>Parameters</h4>
458458
</article>
459459
</div>
460460
<section class="footer">
461-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
461+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
462462
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
463463
</section>
464464
</body>

docs/Classes/ChatLayout.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -166,7 +166,7 @@ <h3 id='custom-properties' class='heading'>Custom Properties:</h3>
166166

167167
<p><code><a href="../Classes/ChatLayout.html#/s:10ChatLayoutAAC8settingsAA0aB8SettingsVvp">ChatLayout.settings</a></code></p>
168168

169-
<p><code><a href="../Classes/ChatLayout.html#/s:10ChatLayoutAAC39keepContentOffestAtBottomOnBatchUpdatesSbvp">ChatLayout.keepContentOffestAtBottomOnBatchUpdates</a></code></p>
169+
<p><code><a href="../Classes/ChatLayout.html#/s:10ChatLayoutAAC39keepContentOffsetAtBottomOnBatchUpdatesSbvp">ChatLayout.keepContentOffsetAtBottomOnBatchUpdates</a></code></p>
170170

171171
<p><code><a href="../Classes/ChatLayout.html#/s:10ChatLayoutAAC13visibleBoundsSo6CGRectVvp">ChatLayout.visibleBounds</a></code></p>
172172

@@ -295,9 +295,9 @@ <h4>Declaration</h4>
295295
<li class="item">
296296
<div>
297297
<code>
298-
<a name="/s:10ChatLayoutAAC39keepContentOffestAtBottomOnBatchUpdatesSbvp"></a>
299-
<a name="//apple_ref/swift/Property/keepContentOffestAtBottomOnBatchUpdates" class="dashAnchor"></a>
300-
<a class="token" href="#/s:10ChatLayoutAAC39keepContentOffestAtBottomOnBatchUpdatesSbvp">keepContentOffestAtBottomOnBatchUpdates</a>
298+
<a name="/s:10ChatLayoutAAC39keepContentOffsetAtBottomOnBatchUpdatesSbvp"></a>
299+
<a name="//apple_ref/swift/Property/keepContentOffsetAtBottomOnBatchUpdates" class="dashAnchor"></a>
300+
<a class="token" href="#/s:10ChatLayoutAAC39keepContentOffsetAtBottomOnBatchUpdatesSbvp">keepContentOffsetAtBottomOnBatchUpdates</a>
301301
</code>
302302
</div>
303303
<div class="height-container">
@@ -318,7 +318,7 @@ <h4>Declaration</h4>
318318
<h4>Declaration</h4>
319319
<div class="language">
320320
<p class="aside-title">Swift</p>
321-
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">keepContentOffestAtBottomOnBatchUpdates</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
321+
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">keepContentOffsetAtBottomOnBatchUpdates</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
322322

323323
</div>
324324
</div>
@@ -1088,7 +1088,7 @@ <h4>Declaration</h4>
10881088
</article>
10891089
</div>
10901090
<section class="footer">
1091-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
1091+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
10921092
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
10931093
</section>
10941094
</body>

docs/Classes/ChatLayoutAttributes.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -390,7 +390,7 @@ <h4>Declaration</h4>
390390
</article>
391391
</div>
392392
<section class="footer">
393-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
393+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
394394
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
395395
</section>
396396
</body>

docs/Classes/ChatLayoutInvalidationContext.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -202,7 +202,7 @@ <h4>Declaration</h4>
202202
</article>
203203
</div>
204204
<section class="footer">
205-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
205+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
206206
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
207207
</section>
208208
</body>

docs/Classes/ContainerCollectionReusableView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -378,7 +378,7 @@ <h4>Parameters</h4>
378378
</article>
379379
</div>
380380
<section class="footer">
381-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
381+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
382382
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
383383
</section>
384384
</body>

docs/Classes/ContainerCollectionViewCell.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -378,7 +378,7 @@ <h4>Parameters</h4>
378378
</article>
379379
</div>
380380
<section class="footer">
381-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
381+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
382382
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
383383
</section>
384384
</body>

docs/Classes/EdgeAligningView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -362,7 +362,7 @@ <h4>Parameters</h4>
362362
</article>
363363
</div>
364364
<section class="footer">
365-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
365+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
366366
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
367367
</section>
368368
</body>

docs/Classes/EdgeAligningView/Edge.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -282,7 +282,7 @@ <h4>Declaration</h4>
282282
</article>
283283
</div>
284284
<section class="footer">
285-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
285+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
286286
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
287287
</section>
288288
</body>

docs/Classes/ImageMaskedView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -402,7 +402,7 @@ <h4>Declaration</h4>
402402
</article>
403403
</div>
404404
<section class="footer">
405-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
405+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
406406
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
407407
</section>
408408
</body>

docs/Classes/MessageContainerView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -348,7 +348,7 @@ <h4>Parameters</h4>
348348
</article>
349349
</div>
350350
<section class="footer">
351-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
351+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
352352
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
353353
</section>
354354
</body>

docs/Classes/RoundedCornersContainerView.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<header class="header">
2222
<p class="header-col header-col--primary">
2323
<a class="header-link" href="../index.html">
24-
ChatLayout 0.2.0 Docs
24+
ChatLayout 0.2.1 Docs
2525
</a>
2626
(100% documented)
2727
</p>
@@ -348,7 +348,7 @@ <h4>Declaration</h4>
348348
</article>
349349
</div>
350350
<section class="footer">
351-
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-02)</p>
351+
<p>&copy; 2020 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2020-09-04)</p>
352352
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
353353
</section>
354354
</body>

0 commit comments

Comments
 (0)