, headerFooter: UICollectionReusableView, , , viewcontroller :
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let sectionView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "FooterView", for: indexPath) as! CollectionReusableView
return sectionView
}
:
class CollectionReusableView: UICollectionReusableView {
@IBAction func ButtonClick(_ sender: Any) {
print("Click 1st")
}
@IBAction func ButtonClick2(_ sender: Any) {
print("Click 2nd")
}
}