How to un-hide image if UIWebView URL is not www.example.com - url

I am making a app which opens local files and navigates through them. Is there code I can use which will scan the URL and check if it is a certain URL and if it isn't it will run a command such as;
[homebutton setHidden:NO];
The point of this is to make a 'back/home' button appear if the user navigates to another site rather than the build in pages.
I would really appreciate some help, thank you! :-)

Use the UIWebViewDelegate methods to monitor the URLs that are being loaded. That way you can easily hide or show the button as appropriate for the current URL.

Related

How to show popup ads on click in webview using sketchware

Can someone help me and tell me how to enable popup ads window on click in webview using sketchware
it's a bit tricky to make the WebView interact with the app in sketchware but...you can improvise to work around that...I'm pretty sure there's tons of ways to do it..try this(i can't send an image cause of rep):
add webview widget
Go to event of webview
Click "onPageStarted"
Put "If" block
in the if block You'll compare the url variable with the url when the button is clicked and if they're equal, then load your ad
and if you don't get it...let me know I'll share a project that can do the same thing

Popop Box With URL Like Dribbble.com

Explanation:
I have a portfolio page with all of my graphic design I've made. I always liked the Dribbble way of showing "Shots".
Problem:
The problem is that I don't know how I can make the popup have an URL like on Dribbble. Dribbble opens the "Shots" in a popup box with an URL callback.
Question:
Can you guys point me in the right direction? What is this type of action called? I will appreciate all type of help!
Thanks in advance.
It's a combination of opening a popup with onclick and changing the url and opening the popup when the url has /shots in it onload. The popup content itself is loaded trough ajax.
If you want I can make an example. Do you want to load content that is already on the page in the popup or load external content?

disable external url links in UIWebView

I used some open resource to handle my external links in WebView, so right now every time I click the url a new view would show the page with "Done" "back" "forward" "open link in safari" something like that. But at the same time the earlier webview of my app is still loading and show the url website. How could I stop it? When the user click Done for the new page, definitely they want to go back to the earlier page.
here is the open resource class I used : https://github.com/samvermette/SVWebViewController
Thanks. wish I made myself clear. I'm new here, and also new to ios development.
Not entirely clear what you're asking but every time a link is clicked in a UIWebView, the UIWebView delegate shouldStartLoadWithRequest method gets called.
If you don't want the link to load you simply return NO from this method.
There are also properties in the UIWebView class to enable you to go back or go forward through the page history.
If that doesn't answer your question, can you try and rephrase it.

RSS app in iOS: Detecting the existence of a feed through UIWebView

I'm making an RSS app.
In my "Add Feed" tab there is a UIWebView covering half of the page. I want to be able to google search or type in a website in my web view. On the other half of the page I want to have any feeds that are detected in the UIWebView to be displayed.
When the feeds/feed URL's are displayed, I want them to be next to a "plus" or "add" button. When clicked the feed is then added/saved to a UITableView in another tab.
I'm not asking anyone to write the code for me, but if anyone knows where to start or if there's a certain class that would help, please let me know! Or even a tutorial that gets me on the right track!
Here's an app that has the feature I'm talking about (the detection part) I just want to display it a different way. http://itunes.apple.com/us/app/free-rss-reader/id290537970?mt=8
Any Help is greatly appreciated. Thanks.
Once loading is complete, fetch the HTML content of the web view:
[webView stringByEvaluatingJavaScriptFromString:#"document.documentElement.outerHTML"];
Use a regex or some other method to parse through the content and extract the href and title attributes of the anchor tags.
Use a heuristic to look for link titles or hrefs containing "rss", "feed", or "xml", which may indicate an RSS link.
Present the filtered list of links to your user.

How does Chrome generate thumb views of URLs?

How does Chrome browser capture a thumbnail image of most visited URLs and show me over a blank page under Most visited??
I am interested in knowing how I would implement it using for my website or an extension.. to take take screenshot.
Lalith
I can only tell you how would I implement it. Once you would go to a site, I will add 1 to a counter if how many times you've entered it. If it's in the top 10, I would also take a screen shot of the site (chrome has a window in the class "Chrome_RenderWidgetHostHWND" which is the window that only contains the site, not the buttons and menus around it).
I can only guess it's not too far from what the guys in Google did.
If you want to write an extension that captures a screenshot of a current site then there is chrome.tabs.captureVisibleTab() method.
I think that it takes a screenshot from the last time you visited the page and saves it in the "Top Sites" SQLite database file that can be found in your profile folder.

Resources