Skip to content

Commit

Permalink
Fix Xcode 12.5 build issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed May 14, 2021
1 parent 606c9d5 commit 3bf9bf4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

# Next

Note: This is backwards-compatibility release, it only fixes build issue with Xcode 12.5. For future development please consider migrating to DTCollectionViewManager 8.

### Fixed

* Build issues with Xcode 12.5

## [7.1.0](https://github.com/DenTelezhkin/DTCollectionViewManager/releases/tag/7.1.0)

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import UIKit
import DTModelStorage

//swiftlint:disable:next type_name
// swiftlint:disable:next type_name
private class DummyCollectionViewCellThatPreventsAppFromCrashing: UICollectionViewCell {}

/// Object, that implements `UICollectionViewDataSource` methods for `DTCollectionViewManager`.
Expand Down Expand Up @@ -106,7 +106,7 @@ open class DTCollectionViewDataSource: DTCollectionViewDelegateWrapper, UICollec
to: destination)
}

@available(tvOS 10.2, *)
@available(iOS 14.0, tvOS 10.2, *)
/// Implementation of `UICollectionViewDataSource` protocol.
open func indexTitles(for collectionView: UICollectionView) -> [String]? {
if let reaction = collectionViewReactions.first(where: { $0.methodSignature == EventMethodSignature.indexTitlesForCollectionView.rawValue }) {
Expand All @@ -115,7 +115,7 @@ open class DTCollectionViewDataSource: DTCollectionViewDelegateWrapper, UICollec
return (delegate as? UICollectionViewDataSource)?.indexTitles?(for: collectionView)
}

@available(tvOS 10.2, *)
@available(iOS 14.0, tvOS 10.2, *)
/// Implementation of `UICollectionViewDataSource` protocol.
open func collectionView(_ collectionView: UICollectionView, indexPathForIndexTitle title: String, at index: Int) -> IndexPath {
if let indexPath = performNonCellReaction(.indexPathForIndexTitleAtIndex, argumentOne: title, argumentTwo: index) as? IndexPath {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ open class DTCollectionViewManager {
/// Factory for creating cells and reusable views for UICollectionView
final lazy var viewFactory: CollectionViewFactory = {
precondition(self.isManagingCollectionView, "Please call manager.startManagingWithDelegate(self) before calling any other DTCollectionViewManager methods")
//swiftlint:disable:next force_unwrapping
// swiftlint:disable:next force_unwrapping
let factory = CollectionViewFactory(collectionView: self.collectionView!)
factory.anomalyHandler = anomalyHandler
return factory
Expand Down

0 comments on commit 3bf9bf4

Please sign in to comment.