Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jesse22

macrumors newbie
Original poster
Jun 27, 2010
4
0
I have a few questions regarding webView. I am a reasonably new developer so if you could keep the answers in layman's form that would be greatly appreciated.

1) I'd like to use a loading screen when loading the first webpage in my app. What is the best way to do this but have it go away when the webpage is loaded. I found something about estimatedProgress on apple's site, is this the best and how do I implement this?

2) What is the most simple way to know when the user clicks on a link in order to count the number of links clicked?

3) Is it possible to cut out the bottom 20px or so of a page if it has undesirable content that i want gone?

4) Is it possible to turn off certain links?

5) Can someone explain webFrame vs webView?

6) Should i have a separate view controller to control all of these things or should i just code in mainViewController?

I'm sorry there are so many questions but any help at all would be great. I am a young new developer trying to improve in Objective C and hopefully you can help.
 
Are you familiar with the delegate relationship? If not you should learn about it, it's very important in Cocoa programming. Most of what you're looking for can be done with th UIWebViewDelegate protocol, http://developer.apple.com/iphone/library/documentation/uikit/reference/UIWebViewDelegate_Protocol/Reference/Reference.html. The basic idea is that when the web view starts to do something it will send a message to its delegate that it did something or it might ask its delegate if it should do something. I'm not sure about the 20px thing, but you might be able to do something with JavaScript, there is a function in UIWebView that let's you execute JavaScript.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.