diff options
Diffstat (limited to 'CyteKit')
-rw-r--r-- | CyteKit/WebViewController.h | 2 | ||||
-rw-r--r-- | CyteKit/WebViewController.mm | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h index 2bd5320..e3d5838 100644 --- a/CyteKit/WebViewController.h +++ b/CyteKit/WebViewController.h @@ -146,6 +146,8 @@ - (void) setViewportWidthOnMainThread:(float)value; +- (void) setScrollIndicatorStyle:(UIScrollViewIndicatorStyle)style; + @end #endif//CyteKit_WebViewController_H 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; |