UICollectionView and Supplementary View (header)

前端 未结 10 1269
南旧
南旧 2021-02-04 05:17

Trying to add a a Supplementary view into my UICollectionView as a header. I\'m having issues getting it to work.

I use a custom UICollectionViewFlowL

10条回答
  •  长发绾君心
    2021-02-04 05:48

    A iOS9 bug, In viewcontroller's dealloc set layer delegate nil.

    - (void)dealloc{
    
        if ([[[UIDevice currentDevice] systemVersion] hasPrefix:@"9"]) {
            self.collectionView.layer.delegate = nil;
        }
    }
    

提交回复
热议问题