RT,具體情況是:滾下去的時候發現最后一排不顯示了,再滾上來,第一排的cell也不顯示了。但是不論是消失的第一排還是最后一排,都可以觸發didSelectItemAtIndexPath參考了如下提問:http://stackoverflow.com/questions/13360975/uicollectionviews-cell-disappearing-ioshttp://stackoverflow.com/questions/15310824/uicollectionview-cell-disappears看來stackoverflow上也沒能很好的解決這個問題。如果沒有workaround的話就只好試試PSTCollectionView了。環境:XCode5.1,編譯目標iOS7.1應@未解的提醒,將相關代碼貼上:-(UICollectionViewCell*)collectionView:(UICollectionView*)collectionViewcellForItemAtIndexPath:(NSIndexPath*)indexPath{AppInMineCell*cell=[collectionViewdequeueReusableCellWithReuseIdentifier:@"AppInMineCell"forIndexPath:indexPath];App*app=[self.myappsobjectAtIndex:indexPath.row];NSURL*url=[NSURLURLWithString:[app.iconURLstringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineCharacterSet]]];cell.appName.text=app.name;//appIcon是一個繼承了UIImageView的AsyncImageView,可自行podsearchcell.appIcon.imageURL=url;//circularappiconsoApplewon'tsaywecopycell.appIcon.layer.masksToBounds=YES;cell.appIcon.layer.cornerRadius=32.0f;returncell;}UPDATE:發現并不是只要往上滑下面的cell就會消失,scroll滾動的程度要大到觸發了bounce,才會出現cell消失的情況。temperoryfix:禁用bounce
UICollectionView滾動的時候會出現cell消失的情況
江戶川亂折騰
2019-04-08 11:18:52