UICollectionView 如何自定义 item 之间的间隔样式?
RT,我正在 subclassing UICollectionViewLayout,请问要重写哪些方法或者如何做才能设置 item 之间的间隔样式,比如我想在 item 之间加一条线?
东风谷D早苗
10 years, 1 month ago
Answers
重写
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, 1 month ago