@@ -13,8 +13,7 @@ import Foundation
1313public protocol GenericCollectionDelegateSourceProtocol {
1414
1515 /// Called when a collection view item is selected.
16- /// - Parameter indexPath: The index path of the selected item.
17- func didSelectItem( at indexPath: IndexPath )
16+ func didSelectItem( section: Int , item: Int )
1817
1918 ///Called when the scroll view scrolls, indicating whether the end of the page is reached.
2019 /// - Parameter endOfPage: True if the last item of the last section is visible, false otherwise.
@@ -30,7 +29,7 @@ public extension GenericCollectionDelegateSourceProtocol {
3029
3130 /// Default empty implementation for item selection.
3231 /// - Parameter indexPath: The index path of the selected item.
33- func didSelectItem( at indexPath : IndexPath ) { }
32+ func didSelectItem( section : Int , item : Int ) { }
3433}
3534
3635// MARK: - Generic Delegate Class
@@ -53,7 +52,7 @@ public class GenericCollectionDelegate<Source: GenericCollectionDelegateSourcePr
5352 /// - indexPath: The index path of the selected item.
5453 public func collectionView( _ collectionView: UICollectionView ,
5554 didSelectItemAt indexPath: IndexPath ) {
56- source. didSelectItem ( at : indexPath)
55+ source. didSelectItem ( section : indexPath. section , item : indexPath . item )
5756 }
5857
5958 ///Called when a cell is about to be displayed. Detects if the user reached the end of the collection view.
0 commit comments