TouchImageView.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. - (void)awakeFromNib {
  12. [self becomeFirstResponder];
  13. self.userInteractionEnabled=true;
  14. self.layer.borderColor = [UIColor darkGrayColor].CGColor;
  15. self.layer.borderWidth = 1.0;
  16. // Initialization code
  17. }
  18. /*
  19. // Only override drawRect: if you perform custom drawing.
  20. // An empty implementation adversely affects performance during animation.
  21. - (void)drawRect:(CGRect)rect {
  22. // Drawing code
  23. }
  24. */
  25. - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
  26. // [self setTextColor:COLOR(0,0,0,1.0)];
  27. // UITouch *touch = [touches anyObject];
  28. // CGPoint points = [touch locationInView:self];
  29. // if (points.x >= self.frame.origin.x && points.y >= self.frame.origin.x && points.x <= self.frame.size.width && points.y <= self.frame.size.height)
  30. // {
  31. [delegate TouchImageViewOnTouche:self];
  32. // [delegate touchLabel:self touchesWtihTag:self.tag];
  33. // }
  34. }
  35. @end