問題タブ [uicollectionviewflowlayout]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
swift - 他の CollectionViews に登録された、複数の異なるセルを持つ CollectionView
私は2つの別々のView Controllerを持っています。
にはViewController1
、CollectionView1
正常に動作する と セルがあります。storyboard
withを使用してセルをセットアップしましたReuseIdentifier "Cell1"
。
にはViewController2
、CollectionView2
正常に動作する別のセルがあります。storyboard
withも使用してセルをセットアップしましたReuseIdentifier "Cell2"
。
両方のセルにはカスタム セル クラスがあり、UserCell1
とUserCell2
、および は、個別の 内で正常に動作しますCollectionViews
。
の 2 番目のセルにはCollectionView2
、最初のコレクション ビューのセルを使用します(ie. IndexPath(row: 1, section: 0))
。
ではCollectionView2
、次のものが必要です。
でViewController2
、 内で、各 でcellForItemAt
どのセルに移動するかを示す数式を使用してみました。ただし、最初のセルは登録されていないと言っています...しかし、同じセルがそのホーム内で機能しているため、明らかに機能しています。dequeue
index
ViewController
CollectionView
ReuseIdentifier
内部cellForItemAt (numberOfRowsInSection = 2):
私が得ているエラーは次のとおりです。
前もって感謝します!!!!これは私を夢中にさせています:(