Tôi được phân loại là UICollectionViewLayout
. Càng xa càng tốt.
Tuy nhiên, tôi có một số ô rộng hơn màn hình và đôi khi các ô này biến mất khi cuộn. Khi bạn di chuyển một số chi tiết, họ kỳ diệu xuất hiện lại nơi họ nên. Tôi có thể cho bạn thấy mã của tôi, tuy nhiên tôi nghĩ rằng không có gì sai với nó vì nó hoạt động trong 90% các trường hợp .. Tuy nhiên, các tế bào thực sự lớn (hơn hai lần kích thước màn hình) biến mất đôi khi.Số lượng lớn UICollectionViewCell biến mất với bố cục tùy chỉnh
NSMutableArray* attributes = [NSMutableArray array];
for (int section=0; section < [[self collectionView] numberOfSections]; section++) {
[attributes addObject:[self layoutAttributesForSupplementaryViewOfKind:UICollectionElementKindSectionHeader atIndexPath:[NSIndexPath indexPathForItem:0 inSection:section]]];
for (int row=0; row < [[self collectionView] numberOfItemsInSection:section]; row++) {
NSIndexPath* indexPath = [NSIndexPath indexPathForItem:row inSection:section];
[attributes addObject:[self layoutAttributesForItemAtIndexPath:indexPath]];
}
}
return attributes;
Tôi cũng đã những bài viết: UICollectionView's cell disappearing và Large cells in a UICollectionView getting removed while the cell is still displayed Tuy nhiên, một giải pháp không được đề cập. Ai có thể giúp tôi với điều này? Có thể nào vấn đề là ở phía Apple? Và nếu có, liệu tôi có thể làm gì để tự mình giải quyết nó?
Bạn đã nghe lại trong thời gian can thiệp? –