Created
September 14, 2011 13:46
-
-
Save laiso/1216588 to your computer and use it in GitHub Desktop.
[雑記] UIWebViewのスクロールを無効にする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// こんな感じ?? | |
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