This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from netguru/develop
Release 1.1.0
- Loading branch information
Showing
8 changed files
with
122 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
CarLensCollectionViewLayout/CarLensCollectionViewLayoutOptions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// CarLensCollectionViewLayoutOptions.swift | ||
// CarLensCollectionViewLayout | ||
// | ||
// Copyright © 2019 Netguru. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
/// The optional configuration of CarLensCollectionViewLayout. Use this if you need to customize `CarLensCollectionViewLayout`. | ||
public struct CarLensCollectionViewLayoutOptions { | ||
|
||
/// A minimum spacing between cells. | ||
let minimumSpacing: CGFloat | ||
|
||
/// A deceleration for a scroll view. | ||
let decelerationRate: UIScrollView.DecelerationRate | ||
|
||
/// A value indicating whether collection view should have a scroll indicator. | ||
let shouldShowScrollIndicator: Bool | ||
|
||
/// The size to use for cells. | ||
let itemSize: CGSize? | ||
|
||
/// The initialization of the optional layout configuration. | ||
/// You can initialize it with any of the parameters available. Others will be configured automatically. | ||
/// | ||
/// - Parameters: | ||
/// - minimumSpacing: A minimum spacing between cells. The default value is `20`. | ||
/// - decelerationRate: A deceleration for a scroll view. The default value is `.fast`. | ||
/// - shouldShowScrollIndicator: A value indicating whether collection view should have a scroll indicator. The default value is `false`. | ||
/// - itemSize: The size to use for cells. The default height is equal to a collection view height. The width is equal to the `collection view width - 60`. | ||
public init(minimumSpacing: CGFloat = 20, decelerationRate: UIScrollView.DecelerationRate = UIScrollView.DecelerationRate.fast, shouldShowScrollIndicator: Bool = false, itemSize: CGSize? = nil) { | ||
self.minimumSpacing = minimumSpacing | ||
self.decelerationRate = decelerationRate | ||
self.shouldShowScrollIndicator = shouldShowScrollIndicator | ||
self.itemSize = itemSize | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters