Xcode提醒错误:
-[__NSCFString absoluteURL]: unrecognized selector sent to instance 0x8c4d3a0
*** Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘-[__NSCFString absoluteURL]: unrecognized selector sent to instance 0x8c4d3a0‘
错误原因:
applicationModal.iconURL = [appDictData objectForKey:@"iconUrl"];
appDictData:是字典 iconURL:是 NSURL 类型
改正后代码:
applicationModal.iconURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@",[appDictData objectForKey:@"iconUrl"]]];
其他类似错误未见到,见到再添补
[__NSCFString absoluteURL]错误的解决方案
原文地址:http://www.cnblogs.com/goodheart/p/3984647.html