UICollectionView的sectionInset的意思


UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];

layout.sectionInset = UIEdgeInsetsMake(20, marginLR, 20, marginLR);//設置其邊界

 

UIEdgeInsetsMake(CGFloat top, CGFloat left, CGFloat bottom, CGFloat right) 

top表示的cell與布局頂部的間隙,如果0的情況

layout.sectionInset = UIEdgeInsetsMake(0, marginLR, 20, marginLR);//設置其邊界

layout.sectionInset = UIEdgeInsetsMake(0, marginLR, 20, marginLR);//設置其邊界

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM