自定义代理方法
步骤如下:
1、声明代理方法
@protocol DownLoadOperationDelegate <NSObject>
-(void)didFinshDownLoadWithImage:(UIImage *)image;
@end
2、声明代理属性 作为代理的接口
@property (assign)id<DownLoadOperationDelegate>deleagate;
3、调用代理方法
[self.deleagate didFinshDownLoadWithImage:image];
4、导入代理
5、挂上代理
downLoadOperation.deleagate =self;
6、实现代理方法
-(void)didFinshDownLoadWithImage:(UIImage *)image{
imageView.image = image;
}