這是我的代碼,它給出了"Program received signal "SIGABRT".
我是新iOS
發展。閱讀URL內容XCode sigabrt錯誤
- (IBAction)getData {
NSURL *URL = @"http://www.oeslabs.com/aa.txt";
NSData *data = [NSData dataWithContentsOfURL:URL];
NSString *string = [NSString stringWithUTF8String:[data bytes]];
if (string == nil) {
// an error occurred
label1.text [email protected]"Error";
}
else{
label1.text = string;
}
}
謝謝:)它確實工作 – albatross
@albatross-我很高興幫助你,保持它:) – 2013-07-12 12:36:00