2015-01-28 21:55:17.790 Demo[636:9351] the behavior of the UICollectionViewFlowLayout is notdefined because: 2015-01-28 21:55:17.791 Demo[636:9351]the item height must be less than the height of the UICollectionView minus thesection insets top and bo…
the behavior of the UICollectionViewFlowLayout is not defined because:    the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.   The relev…
问题一: linker command failed with exit code 1 (use -vto see invocation) 原因:导入了.m的头文件,导致同时有两个一样的.m文件在编译 问题二: Xcode真机测试报错:Could not launch... 解决方案一:1.删除/Users/(用户名)/Library/Developer/Xcode/DerivedData/(对应APP程序)文件夹 2.拔掉手机,删除对应的APP程序,完全退出Xcode工具 3.重新连接手机进行…
前言: 本文仅作参考存留,请用新版封装:iOS 更加优雅便捷的UIAlertView/UIAlertController封装使用 UIAlertController是iOS8.0之后出来的新方法,其将系统原先的UIAlertView和UIActionSheet进行了规范整合.iOS9.0之后,UIAlertView和UIActionSheet已经不建议使用,但还未彻底废弃.alert提示窗可以算得上是十分常用的UI控件了,基于上述情况,考虑到版本兼容,笔者将上述控件进行了简单的整合封装.封装之后…
前几天在gitHub看到个不错的效果,就是DaiExpandCollectionView,效果如图:   所以赶紧下下来源码看看他怎么实现的,打开源码看了半天,发现他没写什么关于动画的代码啊... 经高人指点,才明白原来他是利用了UICollectionViewFlowLayout的隐式动画!   所谓隐式动画,就是系统自带的动画了,其实也不是什么高大上的东西,关键是我怎么就没想到可以这么用!   研究了半天人家的源码,基本了解了他实现的思路,然后发现他的这个库用起来比较不方便,需要继承他的co…
1.新建一个xib描述UICollectionViewCell(比如DealCell.xib),设置好resuse identifier(比如deal) 2.控制器继承UICollectionViewController 1> 注册xib [self.collectionView registerNib:[UINib nibWithNibName:@"DealCell" bundle:nil] forCellWithReuseIdentifier:@"deal"…
这是利用人的视觉错觉来实现无限轮播,UICollectionView 有很好的重用机制,这只是部分核心代码,后期还要继续完善和代码重构. #import <UIKit/UIKit.h> #import "ADPageControlView.h" @interface ADCarouselView : UIView /**图片资源数组*/ @property (nonatomic, strong) NSArray *imgs; /**标题数组*/ @property (non…
UICollectionView 是UITableView加强版 UITableView 和UICollectionView的设计思想: 1.布局: UITableView 的布局可以由UITableView本身和UITableViewDelegate完成 UICollectionView的布局由UICollectionLayout的子类UICollectionFlowLayout和UICollectionLayoutDelegate完成 2.布局样式 UITableView单列多行 UICol…
UICollectionView    @interface ViewController ()<UICollectionViewDelegate,UICollectionViewDataSource> @property (nonatomic, strong) UICollectionView *collectionView; @end //collectionView布局初始化 UICollectionViewFlowLayout *flowLayout = [[UICollectionV…
使用UICollectionView 使用UICollectionView的流程: 1. 设定一个UICollectionViewFlowLayout 2. 使用这个设定的UICollectionViewFlowLayout来初始化UICollectionView 3. 设置代理对象 4. 继承UICollectionViewCell设定重用的cell 源码: LargeUICollectionViewFlowLayout.h + LargeUICollectionViewFlowLayout.…