iPhone模拟器没有看到我的NSString类别
发布时间:2020-12-14 19:11:43 所属栏目:百科 来源:网络整理
导读:我为NSString提供了以下类别的应用程序: @interface NSDate(ISO8601Parsing)//This method is the one that does all the work. All the others are convenience methods.+ (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict getRange:(out
我为NSString提供了以下类别的应用程序:
@interface NSDate(ISO8601Parsing) //This method is the one that does all the work. All the others are convenience methods. + (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict getRange:(out NSRange *)outRange; + (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict; //Strictly: NO. + (NSDate *)dateWithString:(NSString *)str timeSeparator:(unichar)timeSep getRange:(out NSRange *)outRange; + (NSDate *)dateWithString:(NSString *)str timeSeparator:(unichar)timeSep; + (NSDate *)dateWithString:(NSString *)str getRange:(out NSRange *)outRange; + (NSDate *)dateWithString:(NSString *)str; @end 该类别位于最终应用程序中,而不是静态库中. 解决方法
使用wsdl2objc生成的代码时遇到了同样的问题(参见
issue).我通过重命名一个方法解决了它:
+ (NSDate *)dateWithString:(NSString *)str 例如 + (NSDate *)wsdl2objcDateWithString:(NSString *)str; 它看起来像上面的代码和新的私有API之间的冲突,但我不确定. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |