1
我使用自定義的UICollectionViewFlowLayout,我已經註冊了此佈局定製重用類...將數據傳遞到UICollectionReusableView
[self registerClass:[noContentDecoration class] forDecorationViewOfKind:knoContentsDecorationKind];
現在,我希望將一些數據傳遞給該裝飾觀點在初始化階段,我想在這個重用類
設置某些屬性,但我不能達到這個觀點,我只找到了UICollectionView此委託方法:
- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingSupplementaryView:(UICollectionReusableView *)view forElementOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath
但這裏的問題:這種方法只有當如文檔中提到的可重複使用的視圖被刪除調用:當一個補充視圖從集合視圖中刪除
使用此方法來檢測,而不是監控視圖本身來看它何時出現或消失。
我能做些什麼來傳遞數據到這個可重用的視圖在初始化?
謝謝
非常感謝你 –