Reputation: 9636
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.
Upvotes: 0
Views: 62
Reputation: 237060
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
Upvotes: 1