Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Commit 9b33cc8

Browse files
author
Anna-Mariia Shkarlinska
committed
Merge branch 'develop' into task/CRAI-362
2 parents 7e92dc2 + 19c9e66 commit 9b33cc8

File tree

8 files changed

+73
-43
lines changed

8 files changed

+73
-43
lines changed

CarLensCollectionViewLayout.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Pod::Spec.new do |s|
44
s.version = "1.0.0"
55
s.summary = "An easy to use Collection View Layout for card-like animation."
66

7-
s.homepage = "https://github.com/netguru/CarlensCollectionViewLayout"
7+
s.homepage = "https://github.com/netguru/CarLensCollectionViewLayout"
88
s.license = { :type => "MIT", :file => "LICENSE.md" }
99
s.authors = { "Anna-Mariia Shkarlinska" => "anna-mariia.shkarlinska@netguru.co",
1010
"Michał Kwiecień" => "michal.kwiecien@netguru.co" }
1111

1212
s.platform = :ios, "9.0"
13-
s.source = { :git => "https://github.com/netguru/CarlensCollectionViewLayout.git", :tag => "#{s.version}" }
14-
s.source_files = "CarlensCollectionViewLayout/**/*.swift"
13+
s.source = { :git => "https://github.com/netguru/CarLensCollectionViewLayout.git", :tag => "#{s.version}" }
14+
s.source_files = "CarLensCollectionViewLayout/**/*.swift"
1515
s.swift_version = "4.2"
1616
s.framework = "UIKit"
1717

CarLensCollectionViewLayout/CarLensCollectionViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ open class CarLensCollectionViewCell: UICollectionViewCell {
5555
}
5656

5757
/// - SeeAlso: UICollectionViewCell
58-
override open func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
58+
open override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
5959
super.apply(layoutAttributes)
6060
guard let attributes = layoutAttributes as? CarLensLayoutAttributes else { return }
6161
isCurrentlyPrimary = !(attributes.progress == 0)

CarLensCollectionViewLayout/CarLensCollectionViewLayout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public final class CarLensCollectionViewLayout: UICollectionViewFlowLayout {
5454
}
5555

5656
/// SeeAlso: UICollectionViewFlowLayout
57-
override public class var layoutAttributesClass: AnyClass {
57+
public override class var layoutAttributesClass: AnyClass {
5858
return CarLensLayoutAttributes.self
5959
}
6060

CarLensCollectionViewLayoutDemo/AppDelegate.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// AppDelegate.swift
33
// CarLensCollectionViewDemo
44
//
5-
// Created by Anna on 08/01/2019.
65
// Copyright © 2019 Netguru. All rights reserved.
76
//
87

CarLensCollectionViewLayoutDemo/CollectionViewCell.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// CollectionViewCell.swift
33
// CarLensCollectionViewDemo
44
//
5-
// Created by Anna on 08/01/2019.
65
// Copyright © 2019 Netguru. All rights reserved.
76
//
87

CarLensCollectionViewLayoutDemo/CollectionViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// CollectionViewController.swift
33
// CarLensCollectionViewDemo
44
//
5-
// Created by Anna on 08/01/2019.
65
// Copyright © 2019 Netguru. All rights reserved.
76
//
87

PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,81 @@
11
# CarLensCollectionViewLayout
22

3-
The beautiful animation of collection view cells.
3+
![](https://img.shields.io/badge/swift-4.2-orange.svg)
4+
![](https://img.shields.io/badge/cocoapods-compatible-green.svg)
5+
![](https://img.shields.io/badge/carthage-compatible-green.svg)
6+
![](https://app.bitrise.io/app/23a07b63b3f55f97/status.svg?token=Rt_2gKUavbR8LQ7PVuTbYg&branch=master)
47

5-
## Team
8+
An easy to use Collection View Layout for card-like animation 🎉
69

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>
913

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!
1115

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
1717

18-
## Coding guidelines
18+
*CarLensCollectionViewLayout* is written in **Swift 4.2** and supports **iOS 9.0+**.
1919

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:
2420

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
3422

35-
## Related repositories
23+
The two main steps are needed for the configuration of *CarLensCollectionViewLayout*:
3624

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)
3777
- [CarLens iOS](https://github.com/netguru/car-recognition-ios)
78+
- [CarLens in App Store](https://itunes.apple.com/us/app/carlens/id1417168518?mt=8)
3879
- [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

Comments
 (0)