diff --git a/CarLensCollectionViewLayout.xcodeproj/project.pbxproj b/CarLensCollectionViewLayout.xcodeproj/project.pbxproj index 3f618c5..1d6cc6b 100644 --- a/CarLensCollectionViewLayout.xcodeproj/project.pbxproj +++ b/CarLensCollectionViewLayout.xcodeproj/project.pbxproj @@ -48,7 +48,7 @@ /* Begin PBXFileReference section */ 9505725D21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarLensCollectionViewLayout.swift; sourceTree = ""; }; 9505725F21D4D922009EA422 /* CarLensLayoutAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarLensLayoutAttributes.swift; sourceTree = ""; }; - 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 = ""; }; 9518382421E4F08300BEA6EB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 9518382621E4F08300BEA6EB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -81,7 +81,7 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 9518382221E4F08300BEA6EB /* CarLensCollectionViewDemo */ = { + 9518382221E4F08300BEA6EB /* CarLensCollectionViewLayoutDemo */ = { isa = PBXGroup; children = ( 9518382921E4F08300BEA6EB /* AppDelegate.swift */, @@ -89,7 +89,7 @@ 9518383B21E4FFCA00BEA6EB /* CollectionViewCell.swift */, 9518384121E5166100BEA6EB /* Supporting files */, ); - path = CarLensCollectionViewDemo; + path = CarLensCollectionViewLayoutDemo; sourceTree = ""; }; 9518384121E5166100BEA6EB /* Supporting files */ = { @@ -106,7 +106,7 @@ 955E4FC521CBFB2800B4C3BB = { isa = PBXGroup; children = ( - 9518382221E4F08300BEA6EB /* CarLensCollectionViewDemo */, + 9518382221E4F08300BEA6EB /* CarLensCollectionViewLayoutDemo */, 955E4FD121CBFB2800B4C3BB /* CarLensCollectionViewLayout */, 955E4FD021CBFB2800B4C3BB /* Products */, ); @@ -116,7 +116,7 @@ isa = PBXGroup; children = ( 955E4FCF21CBFB2800B4C3BB /* CarLensCollectionViewLayout.framework */, - 9518380B21E4F00000BEA6EB /* CarLensCollectionViewDemo.app */, + 9518380B21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo.app */, ); name = Products; sourceTree = ""; @@ -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 */, @@ -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 */ = { @@ -216,7 +216,7 @@ projectRoot = ""; targets = ( 955E4FCE21CBFB2800B4C3BB /* CarLensCollectionViewLayout */, - 9518380A21E4F00000BEA6EB /* CarLensCollectionViewDemo */, + 9518380A21E4F00000BEA6EB /* CarLensCollectionViewLayoutDemo */, ); }; /* End PBXProject section */ @@ -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)", @@ -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)", @@ -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 */, diff --git a/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarLensCollectionViewLayoutDemo.xcscheme b/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarLensCollectionViewLayoutDemo.xcscheme index 07de64d..76b6a74 100644 --- a/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarLensCollectionViewLayoutDemo.xcscheme +++ b/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarLensCollectionViewLayoutDemo.xcscheme @@ -15,8 +15,8 @@ @@ -33,8 +33,8 @@ @@ -56,8 +56,8 @@ @@ -75,8 +75,8 @@ diff --git a/CarLensCollectionViewDemo/AppDelegate.swift b/CarLensCollectionViewLayoutDemo/AppDelegate.swift similarity index 100% rename from CarLensCollectionViewDemo/AppDelegate.swift rename to CarLensCollectionViewLayoutDemo/AppDelegate.swift diff --git a/CarLensCollectionViewDemo/CollectionViewCell.swift b/CarLensCollectionViewLayoutDemo/CollectionViewCell.swift similarity index 100% rename from CarLensCollectionViewDemo/CollectionViewCell.swift rename to CarLensCollectionViewLayoutDemo/CollectionViewCell.swift diff --git a/CarLensCollectionViewDemo/CollectionViewController.swift b/CarLensCollectionViewLayoutDemo/CollectionViewController.swift similarity index 92% rename from CarLensCollectionViewDemo/CollectionViewController.swift rename to CarLensCollectionViewLayoutDemo/CollectionViewController.swift index 90246e8..5946403 100644 --- a/CarLensCollectionViewDemo/CollectionViewController.swift +++ b/CarLensCollectionViewLayoutDemo/CollectionViewController.swift @@ -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() @@ -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 { diff --git a/CarLensCollectionViewDemo/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json b/CarLensCollectionViewLayoutDemo/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from CarLensCollectionViewDemo/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json rename to CarLensCollectionViewLayoutDemo/Supporting files/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/CarLensCollectionViewDemo/Supporting files/Assets.xcassets/Contents.json b/CarLensCollectionViewLayoutDemo/Supporting files/Assets.xcassets/Contents.json similarity index 100% rename from CarLensCollectionViewDemo/Supporting files/Assets.xcassets/Contents.json rename to CarLensCollectionViewLayoutDemo/Supporting files/Assets.xcassets/Contents.json diff --git a/CarLensCollectionViewDemo/Supporting files/Base.lproj/LaunchScreen.storyboard b/CarLensCollectionViewLayoutDemo/Supporting files/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from CarLensCollectionViewDemo/Supporting files/Base.lproj/LaunchScreen.storyboard rename to CarLensCollectionViewLayoutDemo/Supporting files/Base.lproj/LaunchScreen.storyboard diff --git a/CarLensCollectionViewDemo/Supporting files/Base.lproj/Main.storyboard b/CarLensCollectionViewLayoutDemo/Supporting files/Base.lproj/Main.storyboard similarity index 98% rename from CarLensCollectionViewDemo/Supporting files/Base.lproj/Main.storyboard rename to CarLensCollectionViewLayoutDemo/Supporting files/Base.lproj/Main.storyboard index 1268dd7..03e55f6 100644 --- a/CarLensCollectionViewDemo/Supporting files/Base.lproj/Main.storyboard +++ b/CarLensCollectionViewLayoutDemo/Supporting files/Base.lproj/Main.storyboard @@ -19,7 +19,7 @@ - + diff --git a/CarLensCollectionViewDemo/Supporting files/Info.plist b/CarLensCollectionViewLayoutDemo/Supporting files/Info.plist similarity index 100% rename from CarLensCollectionViewDemo/Supporting files/Info.plist rename to CarLensCollectionViewLayoutDemo/Supporting files/Info.plist