• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ios > 设置UICollectionViewFlowLayout的minimumLineSpacing不起作用怎么回事?

设置UICollectionViewFlowLayout的minimumLineSpacing不起作用怎么回事?

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-05

佚名通过本文主要向大家介绍了设置UICollectionViewFlowLayout的minimumLineSpacing不起作用怎么回事?等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 设置UICollectionViewFlowLayout的minimumLineSpacing不起作用怎么回事?
描述:

UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];

layout.minimumLineSpacing =10.0f;
 //2.初始化collectionView
_homeCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, Screen_width , Screen_height - 117) collectionViewLayout:layout];


代码是这样,不知道是什么原因引起minimumLineSpacing属性失效的


解决方案1:

If the delegate object does not implement the
collectionView:layout:minimumLineSpacingForSectionAtIndex: method, the
flow layout uses the value in this property to set the spacing between
lines in a section.

For a vertically scrolling grid, this value represents the minimum
spacing between successive rows. For a horizontally scrolling grid,
this value represents the minimum spacing between successive columns.
This spacing is not applied to the space between the header and the
first line or between the last line and the footer.

The default value of this property is 10.0.

原因有很多,是否时实现了设置minimumLineSpacing的delegate,还和collectionView的滑动方向有关。


分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

相关文章

  • 2017-06-05 iOS开发,如何跳转到系统设置页面。需适配iOS7-10
  • 2017-06-05 KVC和KVO有什么办法检测KVO中注册过的观察者是否释放。
  • 2017-06-05 iOSNSPredicate过滤排序
  • 2017-06-05 QQ里打开pdf功能中,左上角有一个使用其他应用程序打开,请问iOS开发中,如何像QQ一样获取其他应用
  • 2017-06-05 UITableViewCell如何在AutoLayout下根据是否有ImageView自适应高度
  • 2017-06-05 摇号审核通过已经通过审核的应用分享时仍然显示"未审核应用"
  • 2017-06-05 如何在应用内实现下图通话效果
  • 2017-06-05 新浪微博开放平台以及腾讯开发平台的AppleID。
  • 2017-06-05 iOS支持“用其他应用打开”,plist中设置DocumentTypes为哪种类型可以同时支持doc/docx?<UTIs>
  • 2017-06-05 iOS的公司开发的静态库(a)需不需要买开发者证书,不需要上线的静态库需要哪种证书?

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • Swiftswift:如何找一个类的公开的接口?
    • (swift)UIwebView顶部进度条怎么实现的?
    • iOS:能不能获取到当前app的上下行网速-想要实时显示-怎么实现有没有人做过给个思路。
    • appstore应用上线后,从APPSTORE下载很慢
    • messagesenttodeallocatedinstance
    • 截图怎么截iOS截图有白边
    • ios中下载远程html等文件,然后再WEBVIEW中打开浏览。
    • weexweex中iOS如何使用加载多个js文件
    • iOS有没有像android官网上ApiGuides一样的教学资料?
    • [问题探讨]swift解决了重载,却无法兼容selector?

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有