美文网首页iOS实际开发遇到的那些事儿
解决UICollectionView自定义HeadView遮挡滚

解决UICollectionView自定义HeadView遮挡滚

作者: 那夜倚楼听风雨 | 来源:发表于2018-07-05 15:02 被阅读15次

由于出现在iOS11中,所以给出解决方法

Headview.h文件

#ifdef __IPHONE_11_0
@interface LQLayer : CALayer

@end
#endif

Headview.m文件

#ifdef __IPHONE_11_0
@implementation LQLayer

- (CGFloat) zPosition {
    return 0;
}

@end
#endif
#ifdef __IPHONE_11_0
+ (Class)layerClass {
    return [LQLayer class];
}
#endif

日常Bug......

相关文章

网友评论

    本文标题:解决UICollectionView自定义HeadView遮挡滚

    本文链接:https://www.haomeiwen.com/subject/lrjpuftx.html