如何计算图片在uiimageview中加载所用的时间。我在单击按钮时使用此代码
-(IBAction)loadImage:(id)sender
{
//Using block to create image view through NSOperationQueue
NSOperationQueue *queue = [[NSOperationQueue alloc] init];
[queue addOperationWithBlock: ^{
//Create image view and adding it to the view
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 375)];
imageView.image = [UIImage imageNamed:@"Yellow_Red_Parrot.jpg"];
[self.view addSubview:imageView];
}];
}
我想计算从点击到图像视图加载图像所花费的时间。任何人都可以帮助我。
提前致谢