这是我的代码,它让"Program received signal "SIGABRT".
我在iOS
开发方面是新手。
- (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 =@"Error";
}
else{
label1.text = string;
}
}