nst / RuntimeBrowser

Objective-C Runtime Browser, for Mac OS X and iOS
3.55k stars 510 forks source link

Use of -[NSString containsString:] which is unavailable in iOS 7 #14

Closed ghugues closed 8 years ago

ghugues commented 9 years ago

-[NSString containsString:] although very convenient is only available in iOS 8 or OS X 10.10. If you maintain support for iOS 7, you should use -[NSString rangeOfString:]

if ([string containsString:substring]) {}

can be replaced by :

if ([string rangeOfString:substring].location != NSNotFound) {}

MosheBerman commented 8 years ago

This can be closed now, afaik.