• Tools
  • Articles
  • Q&A
  • Login
0 0

UICollectionView 如何自定义 item 之间的间隔样式?


RT,我正在 subclassing UICollectionViewLayout,请问要重写哪些方法或者如何做才能设置 item 之间的间隔样式,比如我想在 item 之间加一条线?

ios uicollectionview

10 years, 7 months ago
东风谷D早苗

东风谷D早苗


share
东风谷D早苗 10 years, 7 months ago

Answers

0

重写 layoutAttributesForDecorationViewOfKind:atIndexPath:

StackOverflow 上有一个相关的问题

相关资料:

  • https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/CreatingCustomLayouts/CreatingCustomLayouts.html
  • http://objccn.io/issue-3-3/
  • https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/AWorkedExample/AWorkedExample.html#//apple_ref/doc/uid/TP40012334-CH8-SW6
answered 10 years, 7 months ago
东风谷D早苗

四夕奈奈子


share
四夕奈奈子 answered 10 years, 7 months ago

Your Answer

Ask Question
Related questions

UICollectionViewCell里的Label为什么会出现文字重叠?

类似淘宝、京东这类iOS客户端的首页UI是怎样搭建的

UICollectionView 下面一行只显示了一半怎么办。

UICollectionView HeaderView 怎么做

UICollectionview背景是黑色无法修改

UICollectionViewLayout中两个方法的疑惑