当我试图打印此字符串我得到了坏访问错误:得到一个错误,当尝试打印stringByReplacingOccurrencesOfString方法
NSString *myPath = [myPath stringByReplacingOccurrencesOfString:@"/Users/Me/Library/iPhone/4.2/MyApp/Documents/Photos/pic1.png"
withString:@"/Users/John/Library/iPhone/5/MyApp/Documents/Photos/picture.png"];
NSLog(@"%@", myPath);
为什么? 谢谢。
非常感谢您的重播,我试图弄明白没有成功。现在没有错误,但输出不显示。我添加NSString * myPath = [[NSString alloc] init]; – Xtrician