Skip to content

Instantly share code, notes, and snippets.

@laiso
Created September 14, 2011 13:46
Show Gist options
  • Save laiso/1216588 to your computer and use it in GitHub Desktop.
Save laiso/1216588 to your computer and use it in GitHub Desktop.
[雑記] UIWebViewのスクロールを無効にする
// こんな感じ??
UIWebView* _webView = [[[UIWebView alloc] init] autorelease];
UIScrollView* webScrollView = [[_webView subviews] lastObject];
if([webScrollView respondsToSelector:@selector(setScrollEnabled:)]){
[webScrollView setScrollEnabled:NO];
}
// lastObject がUIScrollView だとは限らない??
UIWebView* _webView = [[[UIWebView alloc] init] autorelease];
for(UIView* v in [_webView subviews]){
if([v respondsToSelector:@selector(setScrollEnabled:)]){
[v setScrollEnabled:NO];
}
}
// ↑特定のビューだけスルロールする/しない??
// そういえばiOS5 だと<NDA>が追<NDA>のでそ<NDA>いんじゃないかと。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment