Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は10個の要素を持つ1つの配列を持っています。コレクションビューでアイテムとして設定できます。次に、1 つのボタンになる 11 番目の要素を追加します。
どうやってやるの?
配列でコレクションビューを埋めている場合、追加のアイテムまたは新しいアイテムを追加するには、メソッドでその配列を使用してコレクションビューを埋めている配列に追加するだけで、cellForItemAtIndexPath:含めることができますコレクションビューの新しいセル。
cellForItemAtIndexPath: