Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
  2. {
  3. CGFloat radius = 100.0;
  4. CGRect frame = CGRectMake(-radius, -radius,
  5. self.frame.size.width + radius,
  6. self.frame.size.height + radius);
  7.  
  8. if (CGRectContainsPoint(frame, point)) {
  9. return self;
  10. }
  11. return nil;
  12. }
  13.  
  14. - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
  15. {
  16. if (CGRectContainsPoint(self.view.bounds, point) ||
  17. CGRectContainsPoint(button.view.frame, point))
  18. {
  19. return YES;
  20. }
  21. return NO;
  22. }
  23.  
  24. -(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
  25. {
  26. if ( CGRectContainsPoint(self.oversizeButton.frame, point) )
  27. return YES;
  28.  
  29. return [super pointInside:point withEvent:event];
  30. }
  31.  
  32. - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
  33. if (CGRectContainsPoint(button.frame, point)) {
  34. return YES;
  35. }
  36. return [super pointInside:point withEvent:event]; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement