zoukankan      html  css  js  c++  java
  • 关于collectionView 的头视图

    1. 头视图大小

     layout.headerReferenceSize = CGSizeMake(375, 200);

    // 注册头视图

        [self.collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"headerReuse"];

        

    // 设置表头和区域内容

    -(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath

    {

        

     UICollectionReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"headerReuse" forIndexPath:indexPath];

      

        headerView.backgroundColor = [UIColor cyanColor];

        headerView.userInteractionEnabled = YES;

      return headerView;

    }

  • 相关阅读:
    修改用户密码,权限
    域渗透
    跨域
    目录
    C中的extern和static
    XSS进阶
    SQL injection
    双重指针学习笔记
    文件上传学习笔记
    Hello Python
  • 原文地址:https://www.cnblogs.com/fan-cong/p/4878419.html
Copyright © 2011-2022 走看看