diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-17 02:40:48 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-17 02:40:48 -0700 |
commit | 4886cc818ca3f52c7c1683b45ffcdef8b6e57217 (patch) | |
tree | ce3a88a978d156daf4cd0fbd63e0d9b02de7807c /CyteKit/WebViewController.mm | |
parent | f18b4a9767afe6603948fcb7750a24e386b5f0eb (diff) |
Add cydia.setScrollIndicatorStyle().
Diffstat (limited to 'CyteKit/WebViewController.mm')
-rw-r--r-- | CyteKit/WebViewController.mm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index d347a39..f4bb58e 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -559,6 +559,7 @@ float CYScrollViewDecelerationRateNormal; allowsNavigationAction_ = true; [self setHidesNavigationBar:NO]; + [self setScrollIndicatorStyle:UIScrollViewIndicatorStyleDefault]; // XXX: do we still need to do this? [[self navigationItem] setTitle:nil]; @@ -995,6 +996,31 @@ float CYScrollViewDecelerationRateNormal; [self setHidesNavigationBar:[value boolValue]]; } +- (void) setScrollIndicatorStyle:(UIScrollViewIndicatorStyle)style { + if ([webview_ respondsToSelector:@selector(_scrollView)]) { + UIScrollView *scroller([webview_ _scrollView]); + [scroller setIndicatorStyle:style]; + } else if ([webview_ respondsToSelector:@selector(_scroller)]) { + UIScroller *scroller([webview_ _scroller]); + [scroller setScrollerIndicatorStyle:style]; + } else return; +} + +- (void) setScrollIndicatorStyleWithName:(NSString *)style { + UIScrollViewIndicatorStyle value; + + if (false); + else if ([style isEqualToString:@"default"]) + value = UIScrollViewIndicatorStyleDefault; + else if ([style isEqualToString:@"black"]) + value = UIScrollViewIndicatorStyleBlack; + else if ([style isEqualToString:@"white"]) + value = UIScrollViewIndicatorStyleWhite; + else return; + + [self setScrollIndicatorStyle:value]; +} + - (void) viewWillAppear:(BOOL)animated { visible_ = true; |