0

I am using ruby motion and want to increase the clickable area of a UIView. I found an answer for this on SO

I'm trying to find out how to do this in ruby.

Basically I want to subclass UIView and override the pointInside button.

Community
  • 1
  • 1
birdy
  • 9,286
  • 24
  • 107
  • 171

1 Answers1

1

The direct translation of that code would be:

def pointInside(point, withEvent:event)
  margin = 5.0
  area = CGRectInset(self.bounds, -margin, -margin)
  CGRectContainsPoint(area, point)
end
Community
  • 1
  • 1
Chuck
  • 234,037
  • 30
  • 302
  • 389