Skip to content

Commit

Permalink
fixed immovable points #18
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwulf committed Apr 23, 2015
1 parent d61ec5f commit 480e0ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions physics-2D-Verlet/PropertiesView.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ -(id) initWithFrame:(CGRect)frame{
-(UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
UIView* ret = [super hitTest:point withEvent:event];
if(!ret) return nil;
if([ret isKindOfClass:[UIControl class]]){
return ret;

UIView* foobar = ret;
while(foobar.superview){
if([foobar isKindOfClass:[UIControl class]]){
return ret;
}
foobar = foobar.superview;
}
return self;
}
Expand Down

0 comments on commit 480e0ea

Please sign in to comment.