iOS 10: UICollectionView's "allowsSelection" overwrites "allowsMultipleSelection"

Number:rdar://28323532 Date Originated:2016-09-15
Status:Closed Resolved:No
Product:iOS SDK Product Version:10
Classification:Bug Reproducible:
When I toggle "allowsSelection" in a UICollectionView object, it sets that object's "allowsMultipleSelection", overwriting the original value. That should not happen. This issue is easily fixed by reseting "allowsMultipleSelection" after setting "allowsSelection".

Steps to Reproduce:
1 - Set a UICollectionView "allowsMultipleSelection" to true
2 - Set that UICollectionView "allowsSelection" to false ("allowsMultipleSelection" will be set to false)
3 - Set that UICollectionView "allowsSelection" to true ("allowsMultipleSelection" will remain false)

Expected Results:
"allowsMultipleSelection" shouldn't be change disregard of "allowsSelection"

Actual Results:
"allowsMultipleSelection" is set to false

Xcode 8 running on iOS 10 simulators

I've attached an example project that reproduces the error

MacBook Pro Retina Late-13

'' was successfully uploaded.


Personally I also think this is a mistake. When changing properties of an UIKit object, we should certainly not worry about the order of calls... Can you please update documentation, thanks.

By nicolas.millasseau at Oct. 3, 2016, 12:08 p.m. (reply...)

Developer Reply

I understand the decision. I thought it was worth filing a bug because it's not how it behaved previously and more people may struggle with this.

So, being the decision is that it behaves as intended, I'd like to ask that this is properly documented, since the there's no change in the docs while the code behaviour did change.

Apple Developer Relations

This is currently as-designed, although we certainly can see the point the you are bringing up.

Thank you for your feedback. Engineering has determined that this issue behaves as intended.

We are now closing this bug report.

If you just have questions about the resolution, then please update your bug report with that information so we can respond.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!