眾所周知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