美文网首页JC专题
iOS UIcollectionView 总结

iOS UIcollectionView 总结

作者: Farmers | 来源:发表于2016-01-15 16:40 被阅读748次

众所周知UItableView  在iOS7 和 iOS8 后可以结合autolayout 动态计算tableviewCell 的高度,国内也有Sunny 大神的 UITableView-FDTemplateLayoutCell 的框架 附上github地址(https://github.com/forkingdog/UITableView-FDTemplateLayoutCell) 


而相应的 如果我们在项目中用了 UIcollectionView   如何动态计算UIcollectionViewCell 的高度呢

UIcollectionView 动态计算 collectionCell 的高度和宽度方法:

(https://github.com/jzfjay/UICollectionView-ARDynamicHeightLayoutCell)

在开发中我们经常要用到 tag 标签,对于轻量级的可以用 UIbutton 来进行布局 同时设置好约束。

//这里也补充个第三方的   用起来也很方便

https://github.com/shiweifu/SFTagView

这里推荐一个采用 UICollectionView 做的标签 tag 界面 :(swift 传送门:)

https://github.com/gtsif21/UITags

一个用UIcollectionView 做的瀑布流效果,在github 上的star数不少,贴出来 大家闲的时候可以研究下

https://github.com/chiahsien/CHTCollectionViewWaterfallLayout

相关文章

网友评论

    本文标题:iOS UIcollectionView 总结

    本文链接:https://www.haomeiwen.com/subject/kcuhkttx.html