我有很多类要定义,但我不想重复以下工作:
class A < ActiveRecord::Base
end
Run Code Online (Sandbox Code Playgroud)
是否有任何声明语句来定义类而不使用该class语句?
- (IBAction)startDownloadingURL:(id)sender
{
// create the request
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/index.html"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
NSURLDownload *theDownload=[[NSURLDownload alloc] initWithRequest:theRequest delegate:self];
if (!theDownload) {
// inform the user that the download could not be made
}
}
Run Code Online (Sandbox Code Playgroud)
当我运行模拟器时,我收到一个错误:
NSURLDownload unclared,首次使用此功能.
我在哪里可以导入NSURLDownload库.