Github source: BrowserViewController

iPhone apps often have the need to show a web page, and the easiest way to implement this is to have the page opened in Safari. The problem with this, is that now your customer is stuck in Safari, and they might not know how to get back into your app. This project gives you all the boilerplate code you need to create a smooth experience opening web pages within your app, and seamlessly get back with one click.

Browser-View-Controller-1           Browser-View-Controller

Here are the scenarios implemented:

  • Opening a URL from within a method – useful for opening links triggered by a UIButton or UITableView.
  • Opening a URL from within a UITextView – useful for links embedded within text strings that UITextView can automatically identify and turn into clickable hyperlinks.
  • Opening a URL from within a UIWebView – useful for when you are using a UIWebView to render formatted text in your application with hyperlinks.

Getting Started

Please see GitHub for instructions on using the library: http://github.com/nbuggia/Browser-View-Controller–iPhone-/blob/master/README.md

Please let me know if there are any additional features you would like to see in the comment section below!

Thanks

I’d like to thank Joseph Wain of Glypish fame for providing the arrow icons, and making them freely available to everyone. Go buy the best iphone icons from Glypish!

I’d also like to thank Chen-I Lim for the fix for getting this to work with the Facebook auth system. Go check out his many wonderful apps from Qrayon.

Other options

There is one well-known library that does this today: TTWebController, which is part of the well known Three20 iOS library published by Facebook as open source. The only problem with this library is that it requires you to incorporate the whole of Three20 in your app, and doesn’t help with opening links in UIWebViews or UITextViews. However, it is still a solid, well written library you should consider.

References

 

Comments are closed.

Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Set your Twitter account name in your settings to use the TwitterBar Section.