RegexKitLite & Unrecognized Selector Sent to Instance Error
I am not sure why the following line:
addDetails.Addre开发者_C百科ss = [addDetails.Address stringByReplacingOccurrencesOfRegex:@" +" withString:@" "];
causes an "Unrecognized Selector Sent to Instance" error, closing my iPhone App in my Simulator(XCode).
What's wrong with my code?
stringByReplacingOccurrencesOfRegex:withString: is a NSString category defined in RegexKitLite.h of RegexKitLite lib.
Looks like you haven't add this category into your project properly see:
http://regexkit.sourceforge.net/RegexKitLite/#AddingRegexKitLitetoyourProject
or addDetails.Address is not NSString.
精彩评论