mattt/TTTAttributedLabel — pull request #118 by jacobrelkin (2012-08-13 22:07:15+00:00)
Title: Small optimizations ;)

While perusing through the code, I noticed that in [`-detectedLinksInString:range:error:`][0] the usage of [`-[NSRegularExpression enumerateMatchesInString:options:range:withBlock:`]][1] to construct an array of [`NSTextCheckingResult`][2] objects manually was not necessary, as there is another method defined in `NSRegularExpression` which does this for you: [`-matchesInString:options:range:`][3]

☺

[0]:
https://github.com/mattt/TTTAttributedLabel/blob/master/TTTAttributedLabel.m#L291
[1]:
https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009708-CH1-SW10
[2]: https://developer.apple.com/library/ios/#documentation/AppKit/Reference/NSTextCheckingResult_Class/Reference/Reference.html
[3]: https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSRegularExpression_Class/Reference/Reference.html#//apple_ref/occ/instm/NSRegularExpression/matchesInString:options:range: