Mhurd has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/122083

Change subject: Hides gray ios 6 web view scroll gradient.
......................................................................

Hides gray ios 6 web view scroll gradient.

Would appear when doing pull to refresh, etc.

Change-Id: I82eba0eff5be1f455a8705aa0f5340ea9f354907
---
M Wikipedia-iOS.xcodeproj/project.pbxproj
A Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h
A Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m
M Wikipedia-iOS/View Controllers/Preview/PreviewWebView.m
M Wikipedia-iOS/View Controllers/WebView/WebViewController.m
5 files changed, 40 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/83/122083/1

diff --git a/Wikipedia-iOS.xcodeproj/project.pbxproj 
b/Wikipedia-iOS.xcodeproj/project.pbxproj
index 014c728..5c347e2 100644
--- a/Wikipedia-iOS.xcodeproj/project.pbxproj
+++ b/Wikipedia-iOS.xcodeproj/project.pbxproj
@@ -221,6 +221,8 @@
                04AE1C711891B302002D5487 /* NSObject+Extras.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04AE1C6F1891B302002D5487 /* NSObject+Extras.m 
*/; };
                04AE1C741891BB32002D5487 /* Article.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04AE1C731891BB32002D5487 /* Article.m */; };
                04AE1C751891BB32002D5487 /* Article.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04AE1C731891BB32002D5487 /* Article.m */; };
+               04B6925018E77B2A00F88D8A /* UIWebView+HideScrollGradient.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04B6924F18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m */; };
+               04B6925118E77B2A00F88D8A /* UIWebView+HideScrollGradient.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04B6924F18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m */; };
                04B78A5318A580AF0050EBF5 /* LoginOp.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04B78A5218A580AF0050EBF5 /* LoginOp.m */; };
                04B78A5418A580AF0050EBF5 /* LoginOp.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04B78A5218A580AF0050EBF5 /* LoginOp.m */; };
                04B7B9BD18B5570E00A63551 /* CaptchaViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04B7B9BC18B5570E00A63551 /* 
CaptchaViewController.m */; };
@@ -528,6 +530,8 @@
                04AE1C6F1891B302002D5487 /* NSObject+Extras.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= "NSObject+Extras.m"; sourceTree = "<group>"; };
                04AE1C721891BB32002D5487 /* Article.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Article.h; sourceTree = "<group>"; };
                04AE1C731891BB32002D5487 /* Article.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= Article.m; sourceTree = "<group>"; };
+               04B6924E18E77B2A00F88D8A /* UIWebView+HideScrollGradient.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = "UIWebView+HideScrollGradient.h"; sourceTree = "<group>"; };
+               04B6924F18E77B2A00F88D8A /* UIWebView+HideScrollGradient.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = "UIWebView+HideScrollGradient.m"; sourceTree = 
"<group>"; };
                04B78A5118A580AF0050EBF5 /* LoginOp.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LoginOp.h; sourceTree = "<group>"; };
                04B78A5218A580AF0050EBF5 /* LoginOp.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= LoginOp.m; sourceTree = "<group>"; };
                04B7B9BB18B5570E00A63551 /* CaptchaViewController.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
CaptchaViewController.h; sourceTree = "<group>"; };
@@ -1143,6 +1147,8 @@
                                0433542118A023FE009305F0 /* 
UIViewController+HideKeyboard.m */,
                                04090A39187FB7D000577EDF /* UIView+Debugging.h 
*/,
                                04090A3A187FB7D000577EDF /* UIView+Debugging.m 
*/,
+                               04B6924E18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.h */,
+                               04B6924F18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m */,
                                04F0E2E8186EDC1A00468738 /* 
UIWebView+ElementLocation.h */,
                                04F0E2E9186EDC1A00468738 /* 
UIWebView+ElementLocation.m */,
                                044786861856E4DB0050563B /* UIWebView+Reveal.h 
*/,
@@ -1789,6 +1795,7 @@
                                04D34DAF1863D2D600610A87 /* XPathQuery.m in 
Sources */,
                                047ED63918C13E4900442BE3 /* PreviewWebView.m in 
Sources */,
                                04090A37187F818400577EDF /* TOCImageView.m in 
Sources */,
+                               04B6925018E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m in Sources */,
                                0463639318A5CCEB0049EE4F /* EditTokenOp.m in 
Sources */,
                                0460990A18899A9800B1F2BC /* 
DownloadSectionWikiTextOp.m in Sources */,
                                04C43ABE183442FC006C643B /* 
NSRunLoop+TimeOutAndFlag.m in Sources */,
@@ -1903,6 +1910,7 @@
                                040E5C851846AC13007AFE6F /* 
ArticleDataContextSingleton.m in Sources */,
                                04992BC118B687B000A6C22B /* SearchOp.m in 
Sources */,
                                04D34DBA1863F69500610A87 /* DiscoveryContext.m 
in Sources */,
+                               04B6925118E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m in Sources */,
                                04D34DAE1863D2D600610A87 /* TFHppleElement.m in 
Sources */,
                                04D34DCA1863F6CC00610A87 /* Saved.m in Sources 
*/,
                                047801BF18AE987900DBB747 /* 
UIButton+ColorMask.m in Sources */,
diff --git a/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h 
b/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h
new file mode 100644
index 0000000..a246a32
--- /dev/null
+++ b/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h
@@ -0,0 +1,9 @@
+//  Created by Monte Hurd on 3/29/14.
+
+#import <UIKit/UIKit.h>
+
+@interface UIWebView (HideScrollGradient)
+
+-(void)hideScrollGradient;
+
+@end
diff --git a/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m 
b/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m
new file mode 100644
index 0000000..9d2aea3
--- /dev/null
+++ b/Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m
@@ -0,0 +1,17 @@
+//  Created by Monte Hurd on 3/29/14.
+
+#import "UIWebView+HideScrollGradient.h"
+
+@implementation UIWebView (HideScrollGradient)
+
+-(void)hideScrollGradient
+{
+    if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) return;
+    for (UIView *view in self.scrollView.subviews) {
+        if ([view isKindOfClass:[UIImageView class]]) {
+            view.hidden = YES;
+        }
+    }
+}
+
+@end
diff --git a/Wikipedia-iOS/View Controllers/Preview/PreviewWebView.m 
b/Wikipedia-iOS/View Controllers/Preview/PreviewWebView.m
index 989ed80..42924d6 100644
--- a/Wikipedia-iOS/View Controllers/Preview/PreviewWebView.m
+++ b/Wikipedia-iOS/View Controllers/Preview/PreviewWebView.m
@@ -2,6 +2,7 @@
 
 #import "PreviewWebView.h"
 #import "SessionSingleton.h"
+#import "UIWebView+HideScrollGradient.h"
 
 @interface PreviewWebView ()
 
@@ -13,7 +14,6 @@
 -(void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
 {
     [super loadHTMLString:string baseURL:baseURL];
-    
 }
 
 - (id)initWithCoder:(NSCoder *)aDecoder
@@ -27,7 +27,8 @@
         self.userInteractionEnabled = YES;
         
         self.dataDetectorTypes = UIDataDetectorTypeNone;
-
+        
+        [self hideScrollGradient];
     }
     return self;
 }
diff --git a/Wikipedia-iOS/View Controllers/WebView/WebViewController.m 
b/Wikipedia-iOS/View Controllers/WebView/WebViewController.m
index 7853457..e525ad0 100644
--- a/Wikipedia-iOS/View Controllers/WebView/WebViewController.m
+++ b/Wikipedia-iOS/View Controllers/WebView/WebViewController.m
@@ -27,6 +27,7 @@
 #import "UIViewController+SearchChildViewControllers.h"
 #import "NSManagedObjectContext+SimpleFetch.h"
 #import "UIViewController+HideKeyboard.h"
+#import "UIWebView+HideScrollGradient.h"
 #import "UIWebView+ElementLocation.h"
 #import "UIViewController+Alert.h"
 #import "Section+ImageRecords.h"
@@ -136,6 +137,8 @@
 
     self.webView.backgroundColor = [UIColor colorWithRed:0.98 green:0.98 
blue:0.98 alpha:1.0];
 
+    [self.webView hideScrollGradient];
+
     [self reloadCurrentArticle];
     
     [self setupPullToRefresh];

-- 
To view, visit https://gerrit.wikimedia.org/r/122083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82eba0eff5be1f455a8705aa0f5340ea9f354907
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <mh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to