-1
我有必须使用正则表达式的一个项目,所以我决定用RegexKitLite,我下载了它,增加了RegexKitLite.m成“编译来源”,并RegexKitLite.h将“”复制到“复制文件”部分。项目库增加了libicucore.A.dylib。进口RegexKitLite.h到我的课,写(只是为了测试)代码:RegexKitLite - iOS设备:无法识别的选择
NSString *str = @"testing string";
if ([str isMatchedByRegex:@"[^a-zA-Z0-9]"])
{
NSLog(@"Some message here");
}
之后,我有错误消息:
-[__NSCFString isMatchedByRegex:]: unrecognized selector sent to instance 0x1ed45ac0
2013-02-28 19:46:20.732 TextProject[8467:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString isMatchedByRegex:]: unrecognized selector sent to instance 0x1ed45ac0'
我错过了什么?请帮助我..
没有ü声明你头文件:在您的实现文件#进口“RegexKitLite.h”? – tiguero 2013-02-28 17:58:27
我已经将“RegexKitLite.h”导入到我的标题类 – LightNight 2013-02-28 18:00:42
它适用于Mac OS还是iOS,因为这个lib似乎只适用于MacOS。您还试图导入iOS上不允许的动态库。 – tiguero 2013-02-28 18:08:29