|
1 | 1 | # CarLensCollectionViewLayout |
2 | 2 |
|
3 | | -The beautiful animation of collection view cells. |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
4 | 7 |
|
5 | | -## Team |
| 8 | +An easy to use Collection View Layout for card-like animation 🎉 |
6 | 9 |
|
7 | | -* [Julia Wolszczak](mailto:julia.wolszczak@netguru.co) - Project Manager |
8 | | -* [Anna-Mariia Shkarlinska](mailto:anna-mariia.shkarlinska@netguru.co) - iOS Developer |
| 10 | +<p align="center"> |
| 11 | + <img src="https://user-images.githubusercontent.com/18245585/50694808-2b795e80-103b-11e9-839d-f2d8dc533bb4.gif" width="250"> |
| 12 | +</p> |
9 | 13 |
|
10 | | -## Tools & Services |
| 14 | +*CarLensCollectionViewLayout* was created out of the implementation in [**CarLens** application 🚘](https://github.com/netguru/car-recognition-ios). The image above exactly shows the screen from the app! |
11 | 15 |
|
12 | | -* Tools: |
13 | | - * Xcode 10.1 with latest iOS stable SDK (12.0) and Swift 4.2 |
14 | | -* Services: |
15 | | - * [JIRA](https://netguru.atlassian.net/secure/RapidBoard.jspa?rapidView=584&view=detail) |
16 | | - * [Bitrise](https://app.bitrise.io/app/8f268362f4edaa0d) |
| 16 | +## Requirements |
17 | 17 |
|
18 | | -## Coding guidelines |
| 18 | +*CarLensCollectionViewLayout* is written in **Swift 4.2** and supports **iOS 9.0+**. |
19 | 19 |
|
20 | | -- Respect Swift [API Design Guidelines](https://swift.org/documentation/api-design-guidelines/) |
21 | | -- The code must be readable and self-explanatory - full variable names, meaningful methods, etc. |
22 | | -- Don't leave any commented-out code. |
23 | | -- Write documentation for every method and property accessible outside the class. For example well documented method looks as follows: |
24 | 20 |
|
25 | | - ```swift |
26 | | - /// Tells the magician to perform a given trick. |
27 | | - /// |
28 | | - /// - Parameter trick: The magic trick to perform. |
29 | | - /// - Returns: Whether the magician succeeded in performing the magic trick. |
30 | | - func perform(magicTrick trick: MagicTrick) -> Bool { |
31 | | - // body |
32 | | - } |
33 | | - ``` |
| 21 | +## Usage |
34 | 22 |
|
35 | | -## Related repositories |
| 23 | +The two main steps are needed for the configuration of *CarLensCollectionViewLayout*: |
36 | 24 |
|
| 25 | +### Step 1 |
| 26 | +Assign `CarLensCollectionViewLayout` to yours collection view layout: |
| 27 | +```swift |
| 28 | +collectionView.collectionViewLayout = CarLensCollectionViewLayout() |
| 29 | +``` |
| 30 | +or initialize your collection view with `CarLensCollectionViewLayout`: |
| 31 | +```swift |
| 32 | +UICollectionView(frame: .zero, collectionViewLayout: CarLensCollectionViewLayout()) |
| 33 | +``` |
| 34 | + |
| 35 | +### Step 2 |
| 36 | +Subsclass `CarLensCollectionViewCell` and call `configure(topView: UIView, cardView: UIView)` right on the start! |
| 37 | +```swift |
| 38 | +class CollectionViewCell: CarLensCollectionViewCell { |
| 39 | + override init(frame: CGRect) { |
| 40 | + super.init(frame: frame) |
| 41 | + configure(topView: upperView, cardView: bottomView) |
| 42 | + } |
| 43 | +} |
| 44 | +``` |
| 45 | +The sample implementation is available in [Demo](CarLensCollectionViewDemo) project. |
| 46 | + |
| 47 | +## Installation |
| 48 | + |
| 49 | +### CocoaPods |
| 50 | + |
| 51 | +If you're using [CocoaPods](http://cocoapods.org), add the following dependency to your `Podfile`: |
| 52 | + |
| 53 | +```none |
| 54 | +use_frameworks! |
| 55 | +pod 'CarLensCollectionViewLayout', '~> 1.0.0' |
| 56 | +``` |
| 57 | + |
| 58 | +### Carthage |
| 59 | + |
| 60 | +If you're using [Carthage](https://github.com/Carthage/Carthage), add the following dependency to your `Cartfile`: |
| 61 | + |
| 62 | +```none |
| 63 | +github "netguru/CarLensCollectionViewLayout" ~> 1.0.0 |
| 64 | +``` |
| 65 | + |
| 66 | +## About |
| 67 | + |
| 68 | +This project is made with ❤️ by [Netguru](https://netguru.co). |
| 69 | + |
| 70 | +### License |
| 71 | + |
| 72 | +*CarLensCollectionViewLayout* is licensed under the MIT License. See [LICENSE.md](LICENSE.md) for more info. |
| 73 | + |
| 74 | +## Related links |
| 75 | + |
| 76 | +- [CarLens Page](https://www.netguru.com/carlens) |
37 | 77 | - [CarLens iOS](https://github.com/netguru/car-recognition-ios) |
| 78 | +- [CarLens in App Store](https://itunes.apple.com/us/app/carlens/id1417168518?mt=8) |
38 | 79 | - [CarLens Android](https://github.com/netguru/car-recognition-android) |
39 | | -- [CarLens Machine Learning](https://github.com/netguru/car-recognition-ml) |
| 80 | +- [CarLens on Google Play](https://play.google.com/store/apps/details?id=co.netguru.android.carrecognition&hl=en) |
| 81 | +- [CarLens Story on a Blog](https://www.netguru.com/blog/machine-learning-and-augmented-reality-combined-in-one-sleek-mobile-app-how-we-built-car-lens) |
0 commit comments