Webview Load to touch - xcode

Hello Im New in Xcode Development and i try to make a Easy app
My App:
my mobile app have 5 Tabs, All the tabs have Webview and the problem is to load the app,
Everything works very slow.
I have seen some applications when changing tab load the Webview.
anyone can help me with this.
Sorry for my English i use Google translate.
Thanks.

#user1744203 I can get u now. You can call all the Tab actions in MainViewController then all the actions will be loaded then this reduces the loading time.Still having problem then you can use jQuery which traverse HTML documents speedly...
Maybe this click on this link can help you in fixing jQuery
Hope this Helps!!!!

Related

Page doesn't load properly on webbrowser vb.net

i'm creating an application using vb.net to collect reviews from AliExpress. The thing is, when I load this page in the webbrowser, it loads all buttons and pictures, but buttons do not work, nothing works.
https://feedback.aliexpress.com/display/productEvaluation.htm?productId=32804434631&ownerMemberId=206096294&companyId=218486349&memberType=seller&startValidDate=&i18n=true
I already tried enable/disable javascript from IE, but it didn't work.
Something interesting, if i open this link from Chrome, everything works fine, but if I open the link from IE or from my app (webbrowser), loads everything but its not functional.
I'm pretty sure is some configuration with the IE but I haven't found anything yet in my research.
Any clue what's going on here?
I'd really appreciate your help.

High Sierra WebView blocks anchor tag navigation

I have a Mac app that displays info in a WebView. Quite an old app now and in Objective-C which I am rapidly forgetting.
The WebView contains anchor tags to allow navigation within the pages, both by clicking on links in the page displayed, or by clicking tabs in the UI which send Javascript to the WebView. In High Sierra this no longer works although it displays no error.
It appears that I need to implement isKeyExcludedFromWebScript: but my attempts to do so have failed.
Do I need to sub-class WebView? Putting isKeyExcludedFromWebScript: and isSelectorExcludedFromWebScript: in the View Controller containing the WebView doesn't work - they never get called.
If anyone has any advice or examples, I would be most grateful.
I am afraid that the answer will be to upgrade the app to use WKWebView but I was hoping for a quick work-around until I get time to do that.
Answering my own question here as I have worked out a solution.
The problem was that I was loading an HTML string into the WebView and when I tried to use internal navigation links, it didn't have a base URL to use as a prefix and so the anchor navigation never worked.
It used to work, prior to High Sierra, so there must be something new about how WebViews operate.
The solution was to save the HTML string to a temporary file and have the WebView load that file's URL instead of loading the string directly.
This applies to both WebView and WKWebView.

Opening url (blog) with scroll view

I've tried so many links and they all revert back to a web view.
I only just got Xcode and I'm pretty new to all this stuff, its complete different to C and Java.
Anyways, I have added a scroll view to my frame and gave it a class I've made myself (hopefully that works).
Now, when I load the application, I want it to be able to load a webpage (my blog) into the scroll view
any idea how?
Regards,
Ryan
You need to use a UIWebView for loading web pages. The scroll for UIWebView would automatically adjust according to the size of the webpage.

WebKit shell browser for internal web application

I am creating an in-house web application that I want to run in a WebKit shell browser on the Mac. I searched and came up empty. Basically, I want the site rendered and shown in a window with no chrome for navigating to other pages, bookmarks, etc. Seems to me that there should be a relatively easy way to get something like that up and running in Xcode, but alas I don't know how. The more barebones the better. Anybody know the answer?
Not sure if this is what you're looking for, but you could use a WebView. The content is rendered by Safari/WebKit.
As for chrome, if you just put the view, that's all you'll have. You can shape the rest of the User Interface however you'd like.
Apple's documentation has a couple of examples using WebView... Should this solve your problem.
Did you take a look at the phonegap mac project.
Its a full screen webkit without any chrome in which you can put your html / css / javascript to run:
https://github.com/callback/callback-mac

WebView slow loading

In a cocoa / Mac app I am using a WebView to load a series of YouTube videos (5). When it is loading my whole application locks up for 5 seconds or so.
Is there a way I can load it so it doesn't freeze the rest of the application?
Thanks
eg:
[[webView mainFrame] loadHTMLString:html baseURL:[NSURL URLWithString:#"http://youtube.com"]];
Unfortunately, you cannot render a WebView except on the main thread. This is a basic limitation of the class. I would begin investigating why your page takes so long to render. My hunch: Javascript or a plugin.
I usually like to start by using Safari to see if it has the same issues. You can drag an HTML file onto Safari to load it easily. If Safari shows the same problem, then you can use Safari's Develop tools to profile it. (Preferences, Advanced, Show Develop menu in menu bar.)
If Safari doesn't have a problem, that's actually good, because it means your problem is definitely solvable (if Safari can do it, you should be able to achieve the same thing). Here are some things to try out:
Instruments. Try to see what WebView is taking its time on. Focus first on "all samples" for the main thread. This is usually what leads to the app hanging.
Simplification. Try stripping things out of the webview, especially javascript, until you find the piece that's causing the problem.
Implement the WebResourceLoadDelegate methods to see what piece seems to be causing the problem. The information given by this can be misleading, since it has to do with when things are downloaded, not when they are rendered, but it can give a sense of where in the page you're hanging.

Resources