Skip to content
Browse files

Merge pull request #17 from argentini/master

Added support for status bar "ScrollsToTop" (iOS expected behavior)
  • Loading branch information...
2 parents 5968eaa + 22e129f commit 6c38c449d323f8bc01762c4ee1ac7859af1e1b40 @tonisalae committed Jan 20, 2013
Showing with 14 additions and 0 deletions.
  1. +14 −0 TSMiniWebBrowser/TSMiniWebBrowser.m
View
14 TSMiniWebBrowser/TSMiniWebBrowser.m
@@ -269,6 +269,20 @@ - (void)viewDidUnload
[super viewDidUnload];
}
+- (void) viewWillAppear:(BOOL)animated
+{
+ for (id subview in self.view.subviews)
+ {
+ if ([subview isKindOfClass: [UIWebView class]])
+ {
+ UIWebView *sv = subview;
+ [sv.scrollView setScrollsToTop:NO];
+ }
+ }
+
+ [webView.scrollView setScrollsToTop:YES];
+}
+
-(void) viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];

0 comments on commit 6c38c44

Please sign in to comment.
Something went wrong with that request. Please try again.