本帖最后由 李烨 于 2014-4-17 20:57 编辑
- NSString *s4 = [[NSString alloc] initWithContentsOfFile:@"/Users/liuthou/Desktop/liye.txt" encoding:NSUTF8StringEncoding error:nil];
-
- NSLog(@"%@", s4);
复制代码
用xcode编译没错误,但是一运行
2014-04-17 05:45:38.770 foundation-NSString[503:303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** initialization method -initWithFormat:locale:arguments: cannot be sent to an abstract object of class __NSCFConstantString: Create a concrete instance!'
求解释 |