**********
#import "HMViewController.h"
#import "HMImageDownloader.h" @interface HMViewController ()
//@property (nonatomic, strong) HMImageDownloader *downloader;
@end @implementation HMViewController - (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib. // self.downloader = [[HMImageDownloader alloc] init];
} - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"----touchesBegan");
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ //只能执行一次
NSLog(@"----once");
HMImageDownloader *downloader = [[HMImageDownloader alloc] init];
[downloader download];
});
} @end