Raj*_*tal 0 uicollectionview uicollectionviewdelegate swift
如何在DidSelectItemAtIndexPath上获取集合视图的Header,以便在选择项目时更改header的文本。
您可以使用:
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath){
let indexHeaderForSection = NSIndexPath(row: 0, section: indexPath.section) // Get the indexPath of your header for your selected cell
let header = collectionView.viewForSupplementaryElementOfKind(indexHeaderForSection)
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3730 次 |
| 最近记录: |