我正在尝试异步加载 Web 数据。我知道我可以使用以下内容,但我不知道如何调用 void(load) 方法。我怎么称呼这个?它似乎没有被自动调用。谢谢!
- (void)load
{
NSURL *myURL = [NSURL URLWithString:[NSString
stringWithFormat:@"http://www.website.com"]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:myURL
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60];
[[NSURLConnection alloc] initWithRequest:request delegate:self];
}