Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions CarLensCollectionViewLayout.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/* Begin PBXFileReference section */
9505725D21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarLensCollectionViewLayout.swift; sourceTree = "<group>"; };
9505725F21D4D922009EA422 /* CarLensLayoutAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarLensLayoutAttributes.swift; sourceTree = "<group>"; };
9518380B21E4F00000BEA6EB /* CarLensCollectionViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarLensCollectionViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
9518380B21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CarLensCollectionViewLayoutDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
9518382321E4F08300BEA6EB /* CollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewController.swift; sourceTree = "<group>"; };
9518382421E4F08300BEA6EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9518382621E4F08300BEA6EB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -81,15 +81,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
9518382221E4F08300BEA6EB /* CarLensCollectionViewDemo */ = {
9518382221E4F08300BEA6EB /* CarLensCollectionViewLayoutDemo */ = {
isa = PBXGroup;
children = (
9518382921E4F08300BEA6EB /* AppDelegate.swift */,
9518382321E4F08300BEA6EB /* CollectionViewController.swift */,
9518383B21E4FFCA00BEA6EB /* CollectionViewCell.swift */,
9518384121E5166100BEA6EB /* Supporting files */,
);
path = CarLensCollectionViewDemo;
path = CarLensCollectionViewLayoutDemo;
sourceTree = "<group>";
};
9518384121E5166100BEA6EB /* Supporting files */ = {
Expand All @@ -106,7 +106,7 @@
955E4FC521CBFB2800B4C3BB = {
isa = PBXGroup;
children = (
9518382221E4F08300BEA6EB /* CarLensCollectionViewDemo */,
9518382221E4F08300BEA6EB /* CarLensCollectionViewLayoutDemo */,
955E4FD121CBFB2800B4C3BB /* CarLensCollectionViewLayout */,
955E4FD021CBFB2800B4C3BB /* Products */,
);
Expand All @@ -116,7 +116,7 @@
isa = PBXGroup;
children = (
955E4FCF21CBFB2800B4C3BB /* CarLensCollectionViewLayout.framework */,
9518380B21E4F00000BEA6EB /* CarLensCollectionViewDemo.app */,
9518380B21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -147,9 +147,9 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
9518380A21E4F00000BEA6EB /* CarLensCollectionViewDemo */ = {
9518380A21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9518381A21E4F00200BEA6EB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewDemo" */;
buildConfigurationList = 9518381A21E4F00200BEA6EB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewLayoutDemo" */;
buildPhases = (
9518380721E4F00000BEA6EB /* Sources */,
9518380821E4F00000BEA6EB /* Frameworks */,
Expand All @@ -161,9 +161,9 @@
dependencies = (
9518383621E4F16700BEA6EB /* PBXTargetDependency */,
);
name = CarLensCollectionViewDemo;
name = CarLensCollectionViewLayoutDemo;
productName = Example;
productReference = 9518380B21E4F00000BEA6EB /* CarLensCollectionViewDemo.app */;
productReference = 9518380B21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo.app */;
productType = "com.apple.product-type.application";
};
955E4FCE21CBFB2800B4C3BB /* CarLensCollectionViewLayout */ = {
Expand Down Expand Up @@ -216,7 +216,7 @@
projectRoot = "";
targets = (
955E4FCE21CBFB2800B4C3BB /* CarLensCollectionViewLayout */,
9518380A21E4F00000BEA6EB /* CarLensCollectionViewDemo */,
9518380A21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -299,7 +299,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/CarLensCollectionViewDemo/Supporting Files/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/CarLensCollectionViewLayoutDemo/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -320,7 +320,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/CarLensCollectionViewDemo/Supporting Files/Info.plist";
INFOPLIST_FILE = "$(SRCROOT)/CarLensCollectionViewLayoutDemo/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -511,7 +511,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
9518381A21E4F00200BEA6EB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewDemo" */ = {
9518381A21E4F00200BEA6EB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewLayoutDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9518381B21E4F00200BEA6EB /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9518380A21E4F00000BEA6EB"
BuildableName = "CarLensCollectionViewDemo.app"
BlueprintName = "CarLensCollectionViewDemo"
BuildableName = "CarLensCollectionViewLayoutDemo.app"
BlueprintName = "CarLensCollectionViewLayoutDemo"
ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -33,8 +33,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9518380A21E4F00000BEA6EB"
BuildableName = "CarLensCollectionViewDemo.app"
BlueprintName = "CarLensCollectionViewDemo"
BuildableName = "CarLensCollectionViewLayoutDemo.app"
BlueprintName = "CarLensCollectionViewLayoutDemo"
ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -56,8 +56,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9518380A21E4F00000BEA6EB"
BuildableName = "CarLensCollectionViewDemo.app"
BlueprintName = "CarLensCollectionViewDemo"
BuildableName = "CarLensCollectionViewLayoutDemo.app"
BlueprintName = "CarLensCollectionViewLayoutDemo"
ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -75,8 +75,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9518380A21E4F00000BEA6EB"
BuildableName = "CarLensCollectionViewDemo.app"
BlueprintName = "CarLensCollectionViewDemo"
BuildableName = "CarLensCollectionViewLayoutDemo.app"
BlueprintName = "CarLensCollectionViewLayoutDemo"
ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import CarLensCollectionViewLayout

class CollectionViewController: UICollectionViewController {

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
collectionView.collectionViewLayout = CarLensCollectionViewLayout()
}

override func viewDidLoad() {
super.viewDidLoad()
setupView()
Expand All @@ -25,6 +20,7 @@ class CollectionViewController: UICollectionViewController {
collectionView.backgroundColor = .lightGray
collectionView.register(CollectionViewCell.self, forCellWithReuseIdentifier: CollectionViewCell.identifier)
collectionView.showsHorizontalScrollIndicator = false
collectionView.collectionViewLayout = CarLensCollectionViewLayout()
}

override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewLayout key="collectionViewLayout" id="B1D-Fl-c6g"/>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="NNl-zI-Hqs">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="" id="NNl-zI-Hqs">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
Expand Down