Refresh UIwebview without any shaking? - ios

Currently iam refreshing webview using the following code
[webview reload];
but in this case when i open that viewcontroller i can see a sudden movement(shake or jump) of UIWebview in viewcontroller .Is there any way to to this refresh in background i mean without any change in webview movement?

You van do the same refresh functionality as a background thread,So it will work.

Related

How to prevent WKWebView from reloading when it has been in the background state

My main UIViewController contains a WKWebView. When opening the app, the WKWebView loads an URL in the UIViewController's viewDidLoad method. A web page is displayed in the WKWebView. When the app goes in the background state for a short time and goes back in foreground, the WKWebView reloads the URL. Concerning the WkNavigationDelegate there is no logic inside the didStartProvisionalNavigation method.
Question is : What makes WKWebView reloading when it is back to foreground state ?

Load UIWebview on app Lauch IOS

I am attempting to create an application using the webview feature.
However, I need functionality that will allow me to segue between viewControllers without the webview taking time to present it self when the viewController loads.
This will require loading the webviews on the launch of the app. Any guidance on how to achieve this would be appreciated.
You can create a singleton to hold the UIWebview. In your AppDelegate, you can initialize your singleton and load content of your UIWebview.
Everytime you want to use it, just get this view from the singleton and add it to whereever you want.

Stop webview reload/refresh when app comes to Foreground

I m working on a multiview UIWebView. This webview loaded an external url. This url get reloaded everytime the app comes to the foreground and goes to the first page. This is causing the user to enter any kind of data again and again. Is there a way to stop this url from reloading from webview?
I have already tried using:
1. [self.webView stopLoading];
2. shouldStartLoadingWithRequest making it return NO;
3. UIWebViewNaviagationTypeReload and UIWebViewNaviagationTypeOther
to check if the webviews load status.
But no luck. The Webview keeps reloading?
Can anyone tell me is there any other way to stop the refresh for this url inside webview?

ios 8.3 UIWebView loading indicator not dissapearing

I have a controller with a webview that loads some links. If the link takes some time to load, the webview shows a loading indicator (I don't do it, it is done automatically). If the link does not load, and the user goes back, while he goes to the previous controller, the webview's loading indicator is still active. Any suggestions on how to hide it?
EDIT: image of the indicator I mean:
Indicator
I assume you are referring to the indicator in the status bar that shows when there is network activity. If so, this indicator is controlled by calling
[[UIApplication sharedApplication].networkActivityIndicator=YES|NO;
Applications need to manage the indicator. UIWebView nor the URL loading components of iOS will do this for you.
You should stop a UIWebView instance from continuing to load its view by calling stopLoading.

IPhone UIWebView Application wit AJAX

I'm doing now an iPhone App that encapsulate a web Site inside a UIWebView, the first request is made by the iphone app and it activate the "webViewDidFinishLoad" delegate, but when i press on one of the buttons in the web application inside the UIWebView this delegate is not working, do i need to do anything more in the ViewController or in the Html?
I Think i understand the specific problem: the next calls from the UIWebView are AJAX calls and it does not monitored by the webViewDidFinishLoad, i need some help, anyone know how to handle AJAC calls from UIWebView?
Thanks
Shimon
The right way to do it is to add UIGestureRecognizer to the UIWebView, and in the handler read the UIWebView string, then you can see the AJAX Updates done after the UIWebView was loaded for the first time' solved my problem

Resources