2
我正在使用NVActivityIndicatorView
加载动画。 我有这些功能来添加和删除活动指标。隐藏标题,而收集视图正在加载
func addActivityIndicator() {}
func startActivityIndicatorView() {}
func stopActivityIndicatorView() {}
我有我实现
override func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
let headerView = ...
return headerView
}
我的问题是报头是可见的,而的CollectionView加载一个头。我想隐藏它,而collectionView
正在加载。
viewForSupplementaryElementOfKind不接受零的回报。 –
对不起,我完全错过了,但没想到。如果指标是动画,则需要在相应的委托方法中返回“CGSize.zero”作为标题高度。将'viewForSupplementaryElementOfKind'保持原样并使用相同的想法更新['referenceSizeForHeaderInSection'](https://developer.apple.com/reference/uikit/uicollectionviewdelegateflowlayout/1617702-collectionview?language=objc)。 – ozgur
eyvallahÖzgür:)谢谢。请更新您的答案,我会标记它... –