iOS 开发过程中遇到的Bug和Warning收录(持续更新)
2016-06-15 10:34
543 查看
1.CollectionView的小警告
2015-08-18 16:07:51.523 Example[16070:269647] the behavior of the UICollectionViewFlowLayout
is not defined because: 2015-08-18 16:07:51.523
Example[16070:269647] the item width must be less than the width of the
UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2015-08-18 16:07:51.524 Example[16070:269647] The relevant UICollectionViewFlowLayout
instance is , and it is attached to ; animations = { position=; bounds.origin=; bounds.size=; }; layer = ; contentOffset: {0, 0}; contentSize: {1024, 770}> collection view layout: . 2015-08-18 16:07:51.524 Example[16070:269647] Make a symbolic breakpoint at
UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
解决:
Its
happens because your collection view cell's width is bigger than collection view width after rotation.suppose that you have a 1024x768 screen and your collection view fills the screen.When your device is landscape,your cell's width will be self.collectionView.frame.size.width
- 20 =1004 and its greater than your collection view's width in portrait = 768.The debugger says that "the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right
values".
当你cell的宽度比你collectionView的宽度还要宽的时候,假如你的screen是1024*768的,当你的设备旋转的时候,你的cell宽度将会是大于你的screen宽度768.所有debugger就会告诉你the
item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values,只要把你的collectionView的宽度高度始终保持大于cell的宽度和高度就行了
2015-08-18 16:07:51.523 Example[16070:269647] the behavior of the UICollectionViewFlowLayout
is not defined because: 2015-08-18 16:07:51.523
Example[16070:269647] the item width must be less than the width of the
UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2015-08-18 16:07:51.524 Example[16070:269647] The relevant UICollectionViewFlowLayout
instance is , and it is attached to ; animations = { position=; bounds.origin=; bounds.size=; }; layer = ; contentOffset: {0, 0}; contentSize: {1024, 770}> collection view layout: . 2015-08-18 16:07:51.524 Example[16070:269647] Make a symbolic breakpoint at
UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
解决:
Its
happens because your collection view cell's width is bigger than collection view width after rotation.suppose that you have a 1024x768 screen and your collection view fills the screen.When your device is landscape,your cell's width will be self.collectionView.frame.size.width
- 20 =1004 and its greater than your collection view's width in portrait = 768.The debugger says that "the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right
values".
当你cell的宽度比你collectionView的宽度还要宽的时候,假如你的screen是1024*768的,当你的设备旋转的时候,你的cell宽度将会是大于你的screen宽度768.所有debugger就会告诉你the
item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values,只要把你的collectionView的宽度高度始终保持大于cell的宽度和高度就行了
相关文章推荐
- 使用Xcode检测循环引用
- iOS 如何优雅的处理“回调地狱Callback hell”(一) (下)
- iOS 如何优雅的处理“回调地狱Callback hell”(一) (上)
- IOS开发之----常用函数和常数
- 自定义iOS7导航栏背景,标题和返回按钮文字颜色
- iOS plist文件转换为NSMutableArray
- 怎样在 Mac 上打开 ~_Library 文件夹
- iOS开发小记(十三)
- performSelector 那点事
- iOS,NSPredicate筛选NsmutableArray
- IOS中对图片进行重绘处理的方法总结
- iOS跳转延迟,跳转隐藏tabbar
- iOS - CGAffineTransform属性
- iOS View 加载子视图ViewController
- iOS,scrollview手势冲突
- iOS开发零基础教程之真机调试流程
- iOS中的单例模式
- iOS开发-清理缓存功能的实现
- layoutSubviews总结
- IOS 字符串中去除特殊符号 stringByTrimmingCharactersInSet