diff --git a/CarlensCollectionViewLayout.xcodeproj/project.pbxproj b/CarLensCollectionViewLayout.xcodeproj/project.pbxproj similarity index 81% rename from CarlensCollectionViewLayout.xcodeproj/project.pbxproj rename to CarLensCollectionViewLayout.xcodeproj/project.pbxproj index 6274d01..db68bec 100644 --- a/CarlensCollectionViewLayout.xcodeproj/project.pbxproj +++ b/CarLensCollectionViewLayout.xcodeproj/project.pbxproj @@ -7,19 +7,19 @@ objects = { /* Begin PBXBuildFile section */ - 9505725E21D4D8FB009EA422 /* CarlensCollectionViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9505725D21D4D8FB009EA422 /* CarlensCollectionViewLayout.swift */; }; - 9505726021D4D922009EA422 /* CarlensLayoutAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9505725F21D4D922009EA422 /* CarlensLayoutAttributes.swift */; }; - 955E4FD421CBFB2800B4C3BB /* CarlensCollectionViewLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 955E4FD221CBFB2800B4C3BB /* CarlensCollectionViewLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 958D17C021D66DF00067BED6 /* CarlensCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 958D17BF21D66DF00067BED6 /* CarlensCollectionViewCell.swift */; }; + 9505725E21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9505725D21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift */; }; + 9505726021D4D922009EA422 /* CarLensLayoutAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9505725F21D4D922009EA422 /* CarLensLayoutAttributes.swift */; }; + 955E4FD421CBFB2800B4C3BB /* CarLensCollectionViewLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 955E4FD221CBFB2800B4C3BB /* CarLensCollectionViewLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 958D17C021D66DF00067BED6 /* CarLensCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 958D17BF21D66DF00067BED6 /* CarLensCollectionViewCell.swift */; }; /* End PBXBuildFile section */ /* 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 = ""; }; - 955E4FCF21CBFB2800B4C3BB /* CarlensCollectionViewLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CarlensCollectionViewLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 955E4FD221CBFB2800B4C3BB /* CarlensCollectionViewLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CarlensCollectionViewLayout.h; sourceTree = ""; }; + 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 = ""; }; + 955E4FCF21CBFB2800B4C3BB /* CarLensCollectionViewLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CarLensCollectionViewLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 955E4FD221CBFB2800B4C3BB /* CarLensCollectionViewLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CarLensCollectionViewLayout.h; sourceTree = ""; }; 955E4FD321CBFB2800B4C3BB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 958D17BF21D66DF00067BED6 /* CarlensCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarlensCollectionViewCell.swift; sourceTree = ""; }; + 958D17BF21D66DF00067BED6 /* CarLensCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarLensCollectionViewCell.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -36,7 +36,7 @@ 955E4FC521CBFB2800B4C3BB = { isa = PBXGroup; children = ( - 955E4FD121CBFB2800B4C3BB /* CarlensCollectionViewLayout */, + 955E4FD121CBFB2800B4C3BB /* CarLensCollectionViewLayout */, 955E4FD021CBFB2800B4C3BB /* Products */, ); sourceTree = ""; @@ -44,21 +44,21 @@ 955E4FD021CBFB2800B4C3BB /* Products */ = { isa = PBXGroup; children = ( - 955E4FCF21CBFB2800B4C3BB /* CarlensCollectionViewLayout.framework */, + 955E4FCF21CBFB2800B4C3BB /* CarLensCollectionViewLayout.framework */, ); name = Products; sourceTree = ""; }; - 955E4FD121CBFB2800B4C3BB /* CarlensCollectionViewLayout */ = { + 955E4FD121CBFB2800B4C3BB /* CarLensCollectionViewLayout */ = { isa = PBXGroup; children = ( - 955E4FD221CBFB2800B4C3BB /* CarlensCollectionViewLayout.h */, - 9505725D21D4D8FB009EA422 /* CarlensCollectionViewLayout.swift */, - 958D17BF21D66DF00067BED6 /* CarlensCollectionViewCell.swift */, - 9505725F21D4D922009EA422 /* CarlensLayoutAttributes.swift */, + 955E4FD221CBFB2800B4C3BB /* CarLensCollectionViewLayout.h */, + 9505725D21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift */, + 958D17BF21D66DF00067BED6 /* CarLensCollectionViewCell.swift */, + 9505725F21D4D922009EA422 /* CarLensLayoutAttributes.swift */, 955E4FD321CBFB2800B4C3BB /* Info.plist */, ); - path = CarlensCollectionViewLayout; + path = CarLensCollectionViewLayout; sourceTree = ""; }; /* End PBXGroup section */ @@ -68,16 +68,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 955E4FD421CBFB2800B4C3BB /* CarlensCollectionViewLayout.h in Headers */, + 955E4FD421CBFB2800B4C3BB /* CarLensCollectionViewLayout.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 955E4FCE21CBFB2800B4C3BB /* CarlensCollectionViewLayout */ = { + 955E4FCE21CBFB2800B4C3BB /* CarLensCollectionViewLayout */ = { isa = PBXNativeTarget; - buildConfigurationList = 955E4FD721CBFB2800B4C3BB /* Build configuration list for PBXNativeTarget "CarlensCollectionViewLayout" */; + buildConfigurationList = 955E4FD721CBFB2800B4C3BB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewLayout" */; buildPhases = ( 955E4FCA21CBFB2800B4C3BB /* Headers */, 955E4FCB21CBFB2800B4C3BB /* Sources */, @@ -88,9 +88,9 @@ ); dependencies = ( ); - name = CarlensCollectionViewLayout; + name = CarLensCollectionViewLayout; productName = CarlensCollectionViewLayout; - productReference = 955E4FCF21CBFB2800B4C3BB /* CarlensCollectionViewLayout.framework */; + productReference = 955E4FCF21CBFB2800B4C3BB /* CarLensCollectionViewLayout.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -107,7 +107,7 @@ }; }; }; - buildConfigurationList = 955E4FC921CBFB2800B4C3BB /* Build configuration list for PBXProject "CarlensCollectionViewLayout" */; + buildConfigurationList = 955E4FC921CBFB2800B4C3BB /* Build configuration list for PBXProject "CarLensCollectionViewLayout" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; @@ -119,7 +119,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 955E4FCE21CBFB2800B4C3BB /* CarlensCollectionViewLayout */, + 955E4FCE21CBFB2800B4C3BB /* CarLensCollectionViewLayout */, ); }; /* End PBXProject section */ @@ -139,9 +139,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9505725E21D4D8FB009EA422 /* CarlensCollectionViewLayout.swift in Sources */, - 958D17C021D66DF00067BED6 /* CarlensCollectionViewCell.swift in Sources */, - 9505726021D4D922009EA422 /* CarlensLayoutAttributes.swift in Sources */, + 9505725E21D4D8FB009EA422 /* CarLensCollectionViewLayout.swift in Sources */, + 958D17C021D66DF00067BED6 /* CarLensCollectionViewCell.swift in Sources */, + 9505726021D4D922009EA422 /* CarLensLayoutAttributes.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -287,7 +287,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = co.netguru.lib.CarlensCollectionViewLayout; + PRODUCT_BUNDLE_IDENTIFIER = co.netguru.lib.CarLensCollectionViewLayout; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; @@ -313,7 +313,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = co.netguru.lib.CarlensCollectionViewLayout; + PRODUCT_BUNDLE_IDENTIFIER = co.netguru.lib.CarLensCollectionViewLayout; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; @@ -325,7 +325,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 955E4FC921CBFB2800B4C3BB /* Build configuration list for PBXProject "CarlensCollectionViewLayout" */ = { + 955E4FC921CBFB2800B4C3BB /* Build configuration list for PBXProject "CarLensCollectionViewLayout" */ = { isa = XCConfigurationList; buildConfigurations = ( 955E4FD521CBFB2800B4C3BB /* Debug */, @@ -334,7 +334,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 955E4FD721CBFB2800B4C3BB /* Build configuration list for PBXNativeTarget "CarlensCollectionViewLayout" */ = { + 955E4FD721CBFB2800B4C3BB /* Build configuration list for PBXNativeTarget "CarLensCollectionViewLayout" */ = { isa = XCConfigurationList; buildConfigurations = ( 955E4FD821CBFB2800B4C3BB /* Debug */, diff --git a/CarlensCollectionViewLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/CarLensCollectionViewLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from CarlensCollectionViewLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to CarLensCollectionViewLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/CarlensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme b/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme similarity index 81% rename from CarlensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme rename to CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme index b1490b2..5643a70 100644 --- a/CarlensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme +++ b/CarLensCollectionViewLayout.xcodeproj/xcshareddata/xcschemes/CarlensCollectionViewLayout.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "CarLensCollectionViewLayout.framework" + BlueprintName = "CarLensCollectionViewLayout" + ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj"> @@ -46,9 +46,9 @@ + BuildableName = "CarLensCollectionViewLayout.framework" + BlueprintName = "CarLensCollectionViewLayout" + ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj"> @@ -64,9 +64,9 @@ + BuildableName = "CarLensCollectionViewLayout.framework" + BlueprintName = "CarLensCollectionViewLayout" + ReferencedContainer = "container:CarLensCollectionViewLayout.xcodeproj"> diff --git a/CarlensCollectionViewLayout/CarlensCollectionViewCell.swift b/CarLensCollectionViewLayout/CarLensCollectionViewCell.swift similarity index 88% rename from CarlensCollectionViewLayout/CarlensCollectionViewCell.swift rename to CarLensCollectionViewLayout/CarLensCollectionViewCell.swift index fc79c4e..351a754 100644 --- a/CarlensCollectionViewLayout/CarlensCollectionViewCell.swift +++ b/CarLensCollectionViewLayout/CarLensCollectionViewCell.swift @@ -1,12 +1,14 @@ // -// CarListCollectionViewCell.swift -// CarRecognition +// CarLensCollectionViewCell.swift +// CarLensCollectionViewCell +// +// Copyright © 2018 Netguru. All rights reserved. // import UIKit.UICollectionView -open class CarlensCollectionViewCell: UICollectionViewCell { +open class CarLensCollectionViewCell: UICollectionViewCell { /// Indicates if the cell is currently displayed as primary cell. public var isCurrentlyPrimary = false @@ -52,7 +54,7 @@ open class CarlensCollectionViewCell: UICollectionViewCell { /// - SeeAlso: UICollectionViewCell override open func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) { super.apply(layoutAttributes) - guard let attributes = layoutAttributes as? CarlensLayoutAttributes else { return } + guard let attributes = layoutAttributes as? CarLensLayoutAttributes else { return } isCurrentlyPrimary = !(attributes.progress == 0) animateViews(toProgress: attributes.progress) } diff --git a/CarlensCollectionViewLayout/CarlensCollectionViewLayout.h b/CarLensCollectionViewLayout/CarLensCollectionViewLayout.h similarity index 89% rename from CarlensCollectionViewLayout/CarlensCollectionViewLayout.h rename to CarLensCollectionViewLayout/CarLensCollectionViewLayout.h index d112195..d01fbe4 100644 --- a/CarlensCollectionViewLayout/CarlensCollectionViewLayout.h +++ b/CarLensCollectionViewLayout/CarLensCollectionViewLayout.h @@ -1,6 +1,6 @@ // -// CarlensCollectionViewLayout.h -// CarlensCollectionViewLayout +// CarLensCollectionViewLayout.h +// CarLensCollectionViewLayout // // Created by Anna on 20/12/2018. // Copyright © 2018 Netguru. All rights reserved. diff --git a/CarlensCollectionViewLayout/CarlensCollectionViewLayout.swift b/CarLensCollectionViewLayout/CarLensCollectionViewLayout.swift similarity index 91% rename from CarlensCollectionViewLayout/CarlensCollectionViewLayout.swift rename to CarLensCollectionViewLayout/CarLensCollectionViewLayout.swift index ef1c906..8ccaacc 100644 --- a/CarlensCollectionViewLayout/CarlensCollectionViewLayout.swift +++ b/CarLensCollectionViewLayout/CarLensCollectionViewLayout.swift @@ -1,14 +1,13 @@ // -// CarlensCollectionViewLayout.swift -// CarlensCollectionViewLayout +// CarLensCollectionViewLayout.swift +// CarLensCollectionViewLayout // -// Created by Anna on 27/12/2018. // Copyright © 2018 Netguru. All rights reserved. // import UIKit -public final class CarlensCollectionViewLayout: UICollectionViewFlowLayout { +public final class CarLensCollectionViewLayout: UICollectionViewFlowLayout { private var firstSetupDone = false @@ -37,7 +36,7 @@ public final class CarlensCollectionViewLayout: UICollectionViewFlowLayout { /// SeeAlso: UICollectionViewFlowLayout override public class var layoutAttributesClass: AnyClass { - return CarlensLayoutAttributes.self + return CarLensLayoutAttributes.self } /// SeeAlso: UICollectionViewFlowLayout @@ -53,7 +52,7 @@ public final class CarlensCollectionViewLayout: UICollectionViewFlowLayout { let ratio = (maxDistance - abs(distanceFromCenter)) / maxDistance let normalizedRatio = min(1, max(0, ratio)) - guard let attributes = attributes as? CarlensLayoutAttributes else { continue } + guard let attributes = attributes as? CarLensLayoutAttributes else { continue } attributes.progress = Double(normalizedRatio) } return allAttributes diff --git a/CarlensCollectionViewLayout/CarlensLayoutAttributes.swift b/CarLensCollectionViewLayout/CarLensLayoutAttributes.swift similarity index 63% rename from CarlensCollectionViewLayout/CarlensLayoutAttributes.swift rename to CarLensCollectionViewLayout/CarLensLayoutAttributes.swift index 7e3b184..4ef4a94 100644 --- a/CarlensCollectionViewLayout/CarlensLayoutAttributes.swift +++ b/CarLensCollectionViewLayout/CarLensLayoutAttributes.swift @@ -1,12 +1,14 @@ // -// CarListLayoutAttributes.swift -// CarRecognition +// CarLensLayoutAttributes.swift +// CarLensLayoutAttributes +// +// Copyright © 2018 Netguru. All rights reserved. // import UIKit -final class CarlensLayoutAttributes: UICollectionViewLayoutAttributes { +final class CarLensLayoutAttributes: UICollectionViewLayoutAttributes { /// Progress towards the center of the screen, value between 0 and 1. var progress = 0.0 @@ -14,13 +16,13 @@ final class CarlensLayoutAttributes: UICollectionViewLayoutAttributes { /// SeeAlso: UICollectionViewLayoutAttributes override func copy(with zone: NSZone?) -> Any { let attributes = super.copy(with: zone) - (attributes as? CarlensLayoutAttributes)?.progress = progress + (attributes as? CarLensLayoutAttributes)?.progress = progress return attributes } /// SeeAlso: UICollectionViewLayoutAttributes override func isEqual(_ object: Any?) -> Bool { - guard let attributes = object as? CarlensLayoutAttributes, + guard let attributes = object as? CarLensLayoutAttributes, attributes.progress == progress else { return false } return super.isEqual(object) } diff --git a/CarlensCollectionViewLayout/Info.plist b/CarLensCollectionViewLayout/Info.plist similarity index 100% rename from CarlensCollectionViewLayout/Info.plist rename to CarLensCollectionViewLayout/Info.plist diff --git a/CarlensCollectionViewLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CarlensCollectionViewLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index fb0b20f..0000000 --- a/CarlensCollectionViewLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/README.md b/README.md index 6d58761..d05a2cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CarlensCollectionViewLayout +# CarLensCollectionViewLayout The beautiful animation of collection view cells. @@ -34,6 +34,6 @@ The beautiful animation of collection view cells. ## Related repositories -- [Carlens iOS](https://github.com/netguru/car-recognition-ios) -- [Carlens Android](https://github.com/netguru/car-recognition-android) -- [Carlens Machine Learning](https://github.com/netguru/car-recognition-ml) +- [CarLens iOS](https://github.com/netguru/car-recognition-ios) +- [CarLens Android](https://github.com/netguru/car-recognition-android) +- [CarLens Machine Learning](https://github.com/netguru/car-recognition-ml) diff --git a/bitrise.yml b/bitrise.yml index 8f295d7..b549db6 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -23,7 +23,7 @@ trigger_map: app: envs: - - XCODEBUILD_PROJECT: ./CarlensCollectionViewLayout.xcodeproj + - XCODEBUILD_PROJECT: ./CarLensCollectionViewLayout.xcodeproj # Workflow declarations @@ -33,7 +33,7 @@ workflows: build: envs: - - XCODEBUILD_SCHEME: CarlensCollectionViewLayout + - XCODEBUILD_SCHEME: CarLensCollectionViewLayout before_run: - build-scheme after_run: