Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:21:37+00:00 2026-06-14T22:21:37+00:00

When using a UICollectionView with allowsMultipleSelection set to YES only a dozen items are

  • 0

When using a UICollectionView with allowsMultipleSelection set to YES only a dozen items are selectable. UICollectionViewDelegate stops calling collectionView:didSelectItemAtIndexPath:.

It seems very random. You can select a few items, scroll down, select some more, and at some point you’re not able to select any more items.

When the cell is smaller you seem to be able to select more items. The larger the cell, the fewer items you’re able to select before it stops working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:21:39+00:00Added an answer on June 14, 2026 at 10:21 pm

    I have discovered that while my previous answer works, it may be caused by not calling super. While the documentation for UICollectionReusableView fails to mention this, the documentation for UITableViewCell, which has the same method, does.

    - (void)prepareForReuse
    {
        [super prepareForReuse]
        // Your code here.
    }
    

    Old Answer:


    This may be a bug with the UICollectionView.

    What’s happening is cells that were previously selected are being reused and maintain the selected state. The collection view isn’t setting selected to “NO”.

    The solution is to reset the the selected state in prepareForReuse of the cell:

    - (void)prepareForReuse
    {
        self.selected = NO;
    }
    

    If the reused cell is selected, the collection view will set selected to “YES” after prepareForReuse is called.

    This is something the UICollectionView should be doing on it’s own. Thankfully the solution is simple. Unfortunately I spent a ton of time working around this bug by tracking my own select state. I didn’t realize why it was happening until I was working on another project with smaller cells.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a UICollectionView programmatically. I've set its frame as follows: UICollectionView *collectionView
I want to delete multiple items from my HomeDirectory. I'm using UICollectionView with allowsMultipleSeletion
Using PyGtk's IconView, I can set the icons to be reorderable by calling gtk.IconView.set_reorderable(True)
I have a UICollectionView. It scrolls horizontally, has only a single row of items,
I've got this UICollectionView set up with a fetched results controller, using core data.
I'm making a horizontal picker by using a UICollectionView . It's simple enough: A
As titled. So I was successfully to put DataTable into my CollectionView with using:
I am using UICollectionView to generate several thumbnails in a Master View. This works
I am trying to implement UICollectionView and show images. I am using SDWebimage which
I have a collectionview that I am using to show thumbnails. I want it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.