lslwsjly / HYCollectionViewAlignedLayoutDemo

Layout for UICollectionView which can support left align, right align and middle align
10 stars 2 forks source link

你这个居中对齐,当最后一行有3个item时显示会重叠 #1

Open GodL opened 8 years ago

lslwsjly commented 8 years ago

您是在什么机器上测试? 能否贴出您调用的代码呢?我自己测试的时候虽然有3个item的情况,但并没有重叠。

GodL commented 8 years ago

模拟器上 就是正常的加载collectionview 写了个定时器 每秒随机重构了数据源 有时最后一行就会出现重叠现象

lslwsjly commented 8 years ago

我尝试重现了一下 //reload部分 NSTimeInterval period = 2.0; dispatch_queue_t queue = dispatch_get_main_queue(); _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), period * NSEC_PER_SEC, 0); dispatch_source_set_event_handler(_timer, ^{ [collectionView reloadData]; }); dispatch_resume(_timer);

//修改宽的部分

我没有发现重叠的情况,能否贴出你的这部分代码,让我来看看呢?

guanghua07 commented 7 years ago

我使用也重叠了