zoukankan      html  css  js  c++  java
  • UICollectionView 使用

    //定义每个UICollectionView 的 margin

    -(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section

    {

        return UIEdgeInsetsMake(0, 0, 0, 0);

    }

    #pragma mark --UICollectionViewDelegateFlowLayout

    - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{

        

        return 0;

        

    }

    - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section{

        

        return 0;

        

    }

    调整UICollectionCell的自身与其他Cell的四周间隔,还有每列每行的最小间隔,特别是在使用横向滑动的时候,每个cell与cell间都有一条白色的竖行,当放回为零可以去掉。 

  • 相关阅读:
    C语言I博客作业03
    C语言I博客作业02
    JSON Template
    Mac系统登录不进系统解决办法
    Mac怎么安装并配置Homebrew?
    tensorflow 安装命令
    删除表重复数据
    redhat安装docker
    Rabbit MQ 入门指南
    Maven 集成Tomcat7插件
  • 原文地址:https://www.cnblogs.com/zhulilove/p/6117744.html
Copyright © 2011-2022 走看看