Skip to content
This repository was archived by the owner on Jun 17, 2023. It is now read-only.

Commit 53a21b9

Browse files
committed
Update project's Xcode version to 12.2, Swiftlint changes
1 parent 4219496 commit 53a21b9

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ excluded:
3838
- Package.swift
3939
- Pods
4040
- PagingLayoutSamples/SampleProject.bundle/SampleProject
41+
- Samples/Pods
42+
- Samples/PagingLayoutSamples/SampleProject.bundle/SampleProject
4143

4244
# adjusting rules
4345

CollectionViewPagingLayout.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
298DBBED2441C94900341D8E /* Project object */ = {
221221
isa = PBXProject;
222222
attributes = {
223-
LastUpgradeCheck = 1130;
223+
LastUpgradeCheck = 1220;
224224
ORGANIZATIONNAME = Amir;
225225
TargetAttributes = {
226226
298DBBF52441C94900341D8E = {
@@ -333,6 +333,7 @@
333333
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
334334
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
335335
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
336+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
336337
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
337338
CLANG_WARN_STRICT_PROTOTYPES = YES;
338339
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -396,6 +397,7 @@
396397
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
397398
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
398399
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
400+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
399401
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
400402
CLANG_WARN_STRICT_PROTOTYPES = YES;
401403
CLANG_WARN_SUSPICIOUS_MOVE = YES;

CollectionViewPagingLayout.xcodeproj/xcshareddata/xcschemes/CollectionViewPagingLayout.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 = "1130"
3+
LastUpgradeVersion = "1220"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Lib/CollectionViewPagingLayout.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class CollectionViewPagingLayout: UICollectionViewLayout {
7070
}
7171

7272
private var currentPageCache: Int?
73-
private var attributesCache: [(page: Int, attributes:UICollectionViewLayoutAttributes)]?
73+
private var attributesCache: [(page: Int, attributes: UICollectionViewLayoutAttributes)]?
7474
private var scrollToSelectedCell: Bool = false
7575

7676

@@ -123,7 +123,7 @@ public class CollectionViewPagingLayout: UICollectionViewLayout {
123123
let startIndex = max(0, initialStartIndex - endIndexOutOfBounds)
124124
let endIndex = min(numberOfItems, initialEndIndex + startIndexOutOfBounds)
125125

126-
var attributesArray: [(page: Int, attributes:UICollectionViewLayoutAttributes)] = []
126+
var attributesArray: [(page: Int, attributes: UICollectionViewLayoutAttributes)] = []
127127
var section = 0
128128
var numberOfItemsInSection = collectionView?.numberOfItems(inSection: section) ?? 0
129129
var numberOfItemsInPrevSections = 0
@@ -243,7 +243,7 @@ public class CollectionViewPagingLayout: UICollectionViewLayout {
243243
}
244244
let rect = selectableView.superview?.convert(selectableView.frame, to: collectionView) ?? .zero
245245
return (cell: cell, rect: rect, attributes: attributesAndPage.attributes, page: attributesAndPage.page)
246-
} ?? []
246+
} ?? []
247247

248248
items.sort { $0.attributes.zIndex > $1.attributes.zIndex }
249249

Lib/Snapshot/SnapshotTransformView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ public extension SnapshotTransformView {
9898
if let snapshot = snapshot,
9999
(snapshot.identifier != identifier ||
100100
snapshot.snapshotSize != targetView.bounds.size ||
101-
snapshot.pieceSizeRatio != snapshotOptions.pieceSizeRatio)
102-
{
101+
snapshot.pieceSizeRatio != snapshotOptions.pieceSizeRatio) {
103102
snapshot.removeFromSuperview()
104103
return nil
105104
}

Lib/TransformableView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ public extension TransformableView where Self: UICollectionViewCell {
5050
contentView.subviews.first
5151
}
5252
}
53-

Samples/PagingLayoutSamples/Modules/LayoutDesigner/LayoutDesignerViewController.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ class LayoutDesignerViewController: UIViewController, ViewModelBased, NibBased {
4848
}
4949
}
5050

51-
deinit {
52-
NotificationCenter.default.removeObserver(self)
53-
}
54-
5551

5652
// MARK: Event listeners
5753

0 commit comments

Comments
 (0)