Skip to content

Instantly share code, notes, and snippets.

@ktakayama
Created April 20, 2010 09:01
Show Gist options
  • Save ktakayama/372216 to your computer and use it in GitHub Desktop.
Save ktakayama/372216 to your computer and use it in GitHub Desktop.
@interface SampleView : UIView {
UIWebView *html;
}
@property (assign) UIWebView *html;
@end
@implementation SampleView
@synthesize html;
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UIView *v;
for(v in [[[html subviews] objectAtIndex:0] subviews]) {
[v touchesBegan:touches withEvent:event];
}
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[[[html subviews] objectAtIndex:0] touchesMoved:touches withEvent:event];
[super touchesMoved:touches withEvent:event];
}
- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UIView *v;
for(v in [[[html subviews] objectAtIndex:0] subviews]) {
[v touchesEnded:touches withEvent:event];
}
[super touchesEnded:touches withEvent:event];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment