第十三篇、OC_UICollectionView的基本配置
- (UICollectionView *) categoryCollectionView
{
if (! _categoryCollectionView) { // 创建布局
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
layout.itemSize = CGSizeMake(KItemWidth,KItemHeight);
layout.minimumInteritemSpacing = KSpace;
layout.minimumLineSpacing = KSpace;
layout.headerReferenceSize = CGSizeMake(KScreentW,KProductHeaderCellH); _categoryCollectionView = [[UICollectionView alloc]initWithFrame:self.view.bounds collectionViewLayout:layout];
_categoryCollectionView.dataSource = self;
_categoryCollectionView.delegate = self;
_categoryCollectionView.backgroundColor = [UIColor colorWithRed:234.0/ green:234.0/ blue:234.0/ alpha:]; // 注册
[_categoryCollectionView registerNib:[UINib nibWithNibName:@"GFBCategoryCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:KProductCell];
[_categoryCollectionView registerNib:[UINib nibWithNibName:@"GFBCategoryCollectionReusableView" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:KProductHeaderCell]; // 设置内边距,添加轮播图
_categoryCollectionView.contentInset = UIEdgeInsetsMake(KBanerH, , , ); }
return _categoryCollectionView;
}
第十三篇、OC_UICollectionView的基本配置的更多相关文章
- 第十三篇Django Logging配置样例
第十三篇Django Logging配置样例 阅读目录(Content) Django 日志配置模板 官方链接 Django Logging Django 日志配置模板 LOGGING = { 've ...
- 第十三篇 Integration Services:SSIS变量
本篇文章是Integration Services系列的第十三篇,详细内容请参考原文. 简介在前一篇我们结合了之前所学的冒泡.日志记录.父子模式创建一个自定义的SSIS包日志记录模式.在这一篇,我们将 ...
- 【译】第十三篇 Integration Services:SSIS变量
本篇文章是Integration Services系列的第十三篇,详细内容请参考原文. 简介在前一篇我们结合了之前所学的冒泡.日志记录.父子模式创建一个自定义的SSIS包日志记录模式.在这一篇,我们将 ...
- 跟我学SpringCloud | 第十三篇:Spring Cloud Gateway服务化和过滤器
SpringCloud系列教程 | 第十三篇:Spring Cloud Gateway服务化和过滤器 Springboot: 2.1.6.RELEASE SpringCloud: Greenwich. ...
- Spring Cloud第十三篇 | Spring Boot Admin服务监控
本文是Spring Cloud专栏的第十三篇文章,了解前十二篇文章内容有助于更好的理解本文: Spring Cloud第一篇 | Spring Cloud前言及其常用组件介绍概览 Spring Clo ...
- Mysql优化_第十三篇(HashJoin篇)
Mysql优化_第十三篇(HashJoin篇) 目录 Mysql优化_第十三篇(HashJoin篇) 1 适用场景 纯等值查询,不能使用索引 等值查询,使用到索引 多个join条件中至少包含一个等值查 ...
- 解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译)
解剖SQLSERVER 第十三篇 Integers在行压缩和页压缩里的存储格式揭秘(译) http://improve.dk/the-anatomy-of-row-amp-page-compre ...
- IIS负载均衡-Application Request Route详解第二篇:创建与配置Server Farm(转载)
IIS负载均衡-Application Request Route详解第二篇:创建与配置Server Farm 自从本系列发布之后,收到了很多的朋友的回复!非常感谢,同时很多朋友问到了一些问题,有些问 ...
- Python之路【第十三篇】:jQuery -暂无内容-待更新
Python之路[第十三篇]:jQuery -暂无内容-待更新
- Python开发【第二十三篇】:持续更新中...
Python开发[第二十三篇]:持续更新中...
随机推荐
- mariadb yum安装
安装 yum install mariadb mariadb-server -y 启动 systemctl start mariadb systemctl enable mariadb 安全安装 # ...
- 1089 Insert or Merge(25 分)
According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and gr ...
- chapter07
// 包和引入// 包也可以像内部类那样嵌套// 包路径不是绝对路径// 包声明链x.y.x并不自动 将中间包x和x.y变成可见// 位于文件顶部不带花括号的包声明在整个文件范围内有效// 包对象可以 ...
- hadoop操作权限问题:WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
今天想从Eclipse向hdfs上传文件时遇到了一个权限问题,日志如下: ERROR hive.log: Got exception: org.apache.hadoop.security.Acces ...
- PHP实例:使用PHPExcel导入Excel2003文档和Excel2007文档到MySQL数据库中
如果要使用phpExcelReader将Excel 数据导入到mysql 数据库,请读者点击这个文章查看. 使用phpExcelReader将Excel 数据导入到mysql 数据库. 下面我们介绍另 ...
- hdu 5489——Removed Interval——————【删除一段区间后的LIS】
Removed Interval Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) ...
- c#异步Begininvoke使用随笔
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- 添加egit插件
1.下载egit插件 打开Eclipse,git需要eclipse授权,通过网页是无法下载egit的安装包的.在菜单栏依次打开eclipse→help→install new software→add ...
- Django之model基础(查询补充)
学习完简单的单表查询外,是远远不够的,今天我们对查询表记录做一个补充,接下来来看看基于对象的跨表查询.基于双下划线的跨表查询,聚合查询和分组查询,F查询与Q查询. 比如我们有如下一张表,在model中 ...
- 锁丶threading.local丶线程池丶生产者消费者模型
一丶锁 线程安全: 线程安全能够保证多个线程同时执行时程序依旧运行正确, 而且要保证对于共享的数据,可以由多个线程存取,但是同一时刻只能有一个线程进行存取. import threading v = ...