Opening url (blog) with scroll view - cocoa

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.

Related

How to reload a banner ad from a view's ViewModel?

I have implemented a pull-to-refresh to my xamarin app. I am using MVVM, and I want to know if and how could I reload/refresh the banner ad that I have in my view, from the Refresh command that my pull-to-refresh raises. Which obviously is in the ViewModel. I searched everywhere but there is not any documentation on this. Also I think that I could manually navigate back and then navigate to that page again, but I don't think that's the most efficient solution.
Thank you in advance!
EDIT1 - I am using the Prism framework in case that helps, I didn't find a way to even reload the entire view, with prism.

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.

Webview Load to touch

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!!!!

Dashcode question - OnClick image to fullscreen?

I have a web app I'm building in Dashcode, currently every thing is working as advertised. I'm using the browser template and was able to modify it a bit, got the xml working to connect images and their description. Now I want to add a simple OnClick event that sends the image to fullscreen but I can't find any documentation for that. I'm pretty sure this is easily done so I'm missing something here? Any help greatly appreciated.
Tom
Taking over the screen is a bit complicated (if your talking about a full screen experience like youtube), but full screen in the browser window is defiantly possible. The simplest method is to have the click event open a link to the image location. This would load the image in full resolution in the browser window. A more elegant approach would be to load the image url into the source of a image dashcode object. and have that objects visibility only appear overs the whole web app when the Oncick event occurs. If you are talking about a built in function in dashcode to achieve a full screen/browser image, your out of luck.

How do I scroll my Palm webOS application?

This feels like a dumb newbie question. I'm attempting to follow the Palm's online tutorial for developing a webOS app. I ran palm-generate and tried updating the generated index.html file to have a body with a bunch of content (the word "HELLO" repeated 400 times).
When I attempt to load that document in the emulator, I find that I'm unable to scroll the screen to read the rest of the text. I drag the screen, but nothing happens. The page scrolls just fine in the Palm web browser.
Is there a setting to allow users to drag my app to scroll it? I see documentation for a Mojo.Widget.Scroller, but that seems like it shouldn't be necessary for a simple web page with a bunch of text on it.
Thanks to arthurthornton:
You can take anything that would normally be inside the tags and put that inside the scene HTML file.
OR you could just make a basic scene with a webview widget inside it that has your site as the source.
Unfortunately, the Scroller widget is needed for scrolling. The standard WebKit view that's shown in a card has no native scrolling ability, so the Mojo scroller widget implements the logic for displaying more content that can fit.
You can try this out by making a new project in the Ares IDE. Just add a Scroller and use the Maximize button to make it fill the scene. Then, add a HTML object to it, and add your HTML content to that object. You'll then have a nice scene which allows you to scroll through a lot of content.

Resources