我刚刚注意到uicollectionviewcells的中心是真实中心的一半。例子:将单元格的框架设置为:[0]{{0,0},{100,100}}[1]{{100,100},{100,100}}[2]{{200,200},{100,100}}[3]{{300,300},{100,100}}[4]{{400,400},{100,100}}[5]{{500,500},{100,100}}注意:这是我从setFrame和applyLayoutAttributes:获得的值看起来像这样:但应该是这样的:UICollectionViewLayout子类的实现@implementationCVTL