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