How do I create a button to go to a web page

Hi all,

I am new to developing an Iphone application and have a question?

I want to create an image button and when the user touches the button it takes them to a web page to display our current sales.  

What is the best way to do this?
tradomskiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tradomskiAuthor Commented:
Thank you for your help.

Tom
0
SpeedyApocalypseCommented:
Hello Tom,

You have a couple options here.  One of them is to have an in-house Web View to view the website or to transfer to Safari to bring up the website.

Web View

You can create a UIWebView instance through Interface Builder or by add the sub-view.  

Here is a tutorial (or two) to create the UIWebView in your application:

- http://www.iphonesdkarticles.com/2008/08/uiwebview-tutorial.html
- http://dblog.com.au/iphone-development/iphone-sdk-tutorial-build-your-very-own-web-browser/

Safari

You can simply switch to Safari instead of hosting the web-view yourself.  However, this will lead users away from your application and could be un-wanted.

Here is an example of loading Google through Safari.  Due note, this will only work on device as the Simulator does not have Safari.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com/"]];

Open in new window


If you have any other questions, please do not hesitate to ask.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nish_trCommented:
Hi,
     The best is use WebView along with delegate -
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
}

Add and activity indicator to your webview and hide it in the above delegate. It shows that process is going on. This delegate called when webview finshed loading the content of that URL

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Swift Programming

From novice to tech pro — start learning today.