开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜