// // ElePicView.m // JSJPCoach // // Created by EchoShacolee on 2018/1/31. // Copyright © 2018年 Danson. All rights reserved. // #import "ElePicView.h" @implementation ElePicView -(void)awakeFromNib{ [super awakeFromNib]; self.layer.shadowOffset = CGSizeMake(3, 3); self.layer.shadowColor = [UIColor grayColor].CGColor; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapClick)]; [self.imgV addGestureRecognizer:tap]; self.imgV.userInteractionEnabled = YES; self.imgV.contentMode = UIViewContentModeScaleAspectFit; } -(void)tapClick{ if (self.clickBlock) { self.clickBlock(self.imgV.image); } } /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ @end