[ 
https://issues.apache.org/jira/browse/CB-13659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436159#comment-16436159
 ] 

ASF GitHub Bot commented on CB-13659:
-------------------------------------

stevengill closed pull request #254: CB-13659 (iOS) Add hidespinner option
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/254
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index a4b7cd928..de4c8eef3 100644
--- a/README.md
+++ b/README.md
@@ -101,8 +101,8 @@ instance, or the system browser.
 
 - __options__: Options for the `InAppBrowser`. Optional, defaulting to: 
`location=yes`. _(String)_
 
-    The `options` string must not contain any blank space, and each feature's 
name/value pairs must be separated by a comma. Feature names are case 
insensitive. 
-    
+    The `options` string must not contain any blank space, and each feature's 
name/value pairs must be separated by a comma. Feature names are case 
insensitive.
+
     All platforms support:
 
     - __location__: Set to `yes` or `no` to turn the `InAppBrowser`'s location 
bar on or off.
@@ -134,6 +134,7 @@ instance, or the system browser.
     - __presentationstyle__:  Set to `pagesheet`, `formsheet` or `fullscreen` 
to set the [presentation 
style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle)
 (defaults to `fullscreen`).
     - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or 
`coververtical` to set the [transition 
style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle)
 (defaults to `coververtical`).
     - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). 
Causes the toolbar to be at the top or bottom of the window.
+    - __hidespinner__: Set to `yes` or `no` to change the visibility of the 
loading indicator (defaults to `no`).
 
     Windows supports these additional options:
 
diff --git a/src/ios/CDVInAppBrowser.h b/src/ios/CDVInAppBrowser.h
index d258eb09f..0ad9bd5ea 100644
--- a/src/ios/CDVInAppBrowser.h
+++ b/src/ios/CDVInAppBrowser.h
@@ -52,6 +52,7 @@
 @property (nonatomic, copy) NSString* toolbarposition;
 @property (nonatomic, assign) BOOL clearcache;
 @property (nonatomic, assign) BOOL clearsessioncache;
+@property (nonatomic, assign) BOOL hidespinner;
 
 @property (nonatomic, copy) NSString* presentationstyle;
 @property (nonatomic, copy) NSString* transitionstyle;
@@ -74,13 +75,13 @@
     NSString* _prevUserAgent;
     NSInteger _userAgentLockToken;
     CDVInAppBrowserOptions *_browserOptions;
-    
+
 #ifdef __CORDOVA_4_0_0
     CDVUIWebViewDelegate* _webViewDelegate;
 #else
     CDVWebViewDelegate* _webViewDelegate;
 #endif
-    
+
 }
 
 @property (nonatomic, strong) IBOutlet UIWebView* webView;
@@ -110,4 +111,3 @@
 @property (nonatomic, weak) id <CDVScreenOrientationDelegate> 
orientationDelegate;
 
 @end
-
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index f5d05f013..3daa86ded 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -887,7 +887,10 @@ - (void)webViewDidStartLoad:(UIWebView*)theWebView
     self.backButton.enabled = theWebView.canGoBack;
     self.forwardButton.enabled = theWebView.canGoForward;
 
-    [self.spinner startAnimating];
+    NSLog(_browserOptions.hidespinner ? @"Yes" : @"No");
+    if(!_browserOptions.hidespinner) {
+        [self.spinner startAnimating];
+    }
 
     return [self.navigationDelegate webViewDidStartLoad:theWebView];
 }
@@ -987,6 +990,7 @@ - (id)init
         self.toolbarposition = kInAppBrowserToolbarBarPositionBottom;
         self.clearcache = NO;
         self.clearsessioncache = NO;
+        self.hidespinner = NO;
 
         self.enableviewportscale = NO;
         self.mediaplaybackrequiresuseraction = NO;
@@ -1104,4 +1108,3 @@ - 
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
 
 
 @end
-


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> InAppBrowser: Add option to disable spinner on iOS
> --------------------------------------------------
>
>                 Key: CB-13659
>                 URL: https://issues.apache.org/jira/browse/CB-13659
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-inappbrowser
>            Reporter: Niklas Merz
>            Priority: Major
>              Labels: newbie, starter
>
> Like mentioned in this pull request 
> [https://github.com/apache/cordova-plugin-inappbrowser/pull/89], the 
> inappbrowser needs flags to disable the loading spinner



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to