Reputation: 5060
I have collectionview grid, Now I want to add a UIView on collectionview across full view as show in attached image with yellow color. Blue color column is fixed. I have to drag drop that strip view to in any row. Please, let me know approach.
Upvotes: 0
Views: 39
Reputation: 131426
You don't add views to existing cells. That's not how collection views work. You should tell the collection view to reload the cells in question. You can reload the entire collection view, certain sections, or individual cells (by indexPath)
What you show is a background color, not an image. I suggest changing the background color of the cells that you want to appear yellow rather than adding a new view to those cells. Just remember that your cellForItemAtIndexPath
data source method will need to set the background color of EVERY cell, not just those cells that you want to be yellow or cyan (blue as you call it, but that color is cyan, not blue).
Upvotes: 1