TouchImageView.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // TouchImageView.m
  3. // iSales-NPD
  4. //
  5. // Created by Ray on 2/18/16.
  6. // Copyright © 2016 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "TouchImageView.h"
  9. @implementation TouchImageView
  10. @synthesize delegate;
  11. - (instancetype)initWithFrame:(CGRect)frame
  12. {
  13. self = [super initWithFrame:frame];
  14. if (self) {
  15. [self becomeFirstResponder];
  16. self.userInteractionEnabled=true;
  17. // self.layer.borderColor = [UIColor darkGrayColor].CGColor;
  18. // self.layer.borderWidth = 1.0;
  19. }
  20. return self;
  21. }
  22. - (void)awakeFromNib {
  23. [super awakeFromNib];
  24. [self becomeFirstResponder];
  25. self.userInteractionEnabled=true;
  26. self.layer.borderColor = [UIColor darkGrayColor].CGColor;
  27. self.layer.borderWidth = 1.0;
  28. // Initialization code
  29. }
  30. /*
  31. // Only override drawRect: if you perform custom drawing.
  32. // An empty implementation adversely affects performance during animation.
  33. - (void)drawRect:(CGRect)rect {
  34. // Drawing code
  35. }
  36. */
  37. - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  38. [delegate TouchImageViewOnTouche:self];
  39. }
  40. @end