ER: Fast / smart enumeration for primitives

Originator:matt
Number:rdar://12192393 Date Originated:8/28/2012
Status:Open Resolved:
Product:Developer Tools Product Version:N/A
Classification:Enhancement Reproducible:N/A
 
Summary:
I just accidentally typed

// numberOfSegments is an NSUInteger property on UISegmentedControl
for (NSUInteger segmentIndex in self.segmentedControl.numberOfSegments) {
  // ...
}

and suddenly realized how awesome it would be if that wasn't an error. Between fast enumeration and enumerateWithBlock: I've literally almost forgotten how to write for loops. So in that light maybe this isn't an awesome idea.

No, it's totally awesome. Guaranteed applause at WWDC 2013.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!