uicollectionview select an item immediately after reloaddata?
问题 After calling -[UICollectionView reloadData] it takes some time for cells to be displayed, so selecting an item immediately after calling reloadData does not work. Is there a way to select an item immediately after reloadData ? 回答1: Along the lines of this answer I found that calling layoutIfNeeded after reloadData seemed to effectively 'flush' the reload before I do other things to the collectionView: [self.collectionView reloadData]; [self.collectionView layoutIfNeeded]; ... On the page I