简体   繁体   中英

How to place a web browser inside an iphone application?

such that when the user open the application the website referenced will be loaded in the web browser I know the code the will open a URL with in an application

[NSURL URLWithString:@"http://www.apple.com"]];

But this is not what I need I need the application to display the web browser within its form.

If you are only to show one page I suggest you should use ModalViewController to present the page inside your app and put a UIWebView in it.

If you are to render the web page as an application than you should use UIWebView

If you want to present some pages but also want to make use of navigation functions of the safari inside your app you can use DLWebView framework which suppors ModalView with navigation function.

Here you can watch the video how it works: http://dlinsin.github.com/2011/04/24/DLWebView.html

You need UIWebView class : UIWebView Class Reference

Also you can try to search for a ready webview with all needful buttons.

Have you looked into UIWebView ?

If you need browser functionality within your own app, you will need to create your own, ie it's not possible to embed the Safari browser within a view in your own app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM