一分鐘學會collectionView自定義layout(2、圓形佈局)

圓形佈局很簡單,主要的是實現layoutAttributesForItemAtIndexPath,在這方法裏面計算cell的位置大小。web 第一步:由於不是流水佈局,需繼承自UICollectionViewLayout。 再寫prepareLayout數組 -(void)prepareLayout{ [super prepareLayout]; [self.attrsArray
相關文章
相關標籤/搜索