UICollectionView。它以前在 iOS17 中運行良好,但現(xiàn)在在使用 Xcode 16 / iOS18 beta 運行時崩潰了:
以前代碼關(guān)于cell代碼,是cell代理方法 ,根據(jù)條件 多次進行了dequeueReusableCellWithReuseIdentifier,改成if else if else 即可。就是一種情況,只進行一次dequeueReusableCellWithReuseIdentifier,假設(shè)說有個基類的cell
BaseCell* cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"CRSongSeatCell" forIndexPath:indexPath];
if(條件1){
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ChildCell" forIndexPath:indexPath];
}
return cell;
以前這樣寫不會崩潰,但是在Xcode 16 運行會崩潰。
一般 出現(xiàn)在 多個cell場景下。
bitcode 報錯這個,至今未解決,記錄一下,避免后面忘記。