zoukankan      html  css  js  c++  java
  • UICollectController

     

    //            [collectionView reloadItemsAtIndexPaths:@[sourceIndexPath]];// 只刷新个别item

                [collectionView reloadSections:[NSIndexSet indexSetWithIndex:sourceIndexPath.section]];// 刷新正给section

     

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

    注意返回的UICollectionReusableView上面的子视图,要设置自动伸缩。例如:_lb.autoresizingMask = UIViewAutoresizingFlexibleWidth;而设置

    self.autoresizesSubviews = YES;不起作用

     

     

    • 九宫格 UICollectController

    1.新建一个xib描述cell

    2.注册xib

    3.collectionView显示cell

    *必须设置数据源(和代理并遵守协议) 

    *实现数据源和代理的方法

     

    layout n. 布局;设计;安排;陈列

    dequeue vi. 出列

  • 相关阅读:
    python学习笔记之——unittest框架
    python学习笔记——python JSON
    python学习笔记之——操作mysql数据库
    python学习笔记之——python安装mysqldb后,pycharm导入还是报错问题
    python学习笔记之——python面向对象
    Python学习笔记之—— File(文件) 对象常用函数
    python学习笔记之——文件I/O
    Linux下免安装版sublime text 3显示图标
    PL/SQL客户端中执行insert语句,插入中文乱码
    RocksDB安装
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/4743345.html
Copyright © 2011-2022 走看看