VEWebViewController
is a UIViewController
subclass for the iPhone, designed to be used as the top view in a UINavigationController
.
It presents a UIWebView
and the controls a user would expect to be available for navigating the web. An action menu is also provided, which enables a user to open the current URL in Mobile Safari, or email the current URL.
- Full navigation: Back, Forward, Stop, Reload
- Network status indicator in the status bar
- Loading indicator in the toolbar
- Landscape support
- Action menu displays the current URL
- Action menu items: Open in Safari, Mail Link
- Page title is shown in the navigation bar
- The class provides all of its UI in code, sans-nib. The images it requires are packaged up into a handy
.bundle
to minimize clutter. - You can provide a starting URL using an initializer.
- Include the contents of this repository in your Xcode project using your favorite method of moving stuff around. (Drag-and-drop usually works.)
- Ensure your project is linking against the
MessageUI
framework. - Import the header in the file you’d like to use it with:
#import "VEWebViewController.h"
(Alternatively, if you want to use the view controller in a number of places, add the#import
statement to your.pch
file.) - Create a new instance of
VEWebViewController
, and push it onto your navigation stack:
VEWebViewController *webViewController = [[VEWebViewController alloc] initWithURLString: @"http://www.google.com/"];
[self.navigationController pushViewController: webViewController animated: YES];
[webViewController release];
That’s all there is to it.
VEWebViewController
is licensed under the BSD license. Check the LICENSE
file for the full text and terms.
This project was created and is maintained by @abrahamvegh.
This project is largely inspired by and intended to mimic the look and feel of the in-app web browser in Tweetie 2. We’ll miss you, Tweetie.
Many genius contributions have been made by @monoceroi. She is amazing.
@samvermette is a stand-up guy who has made helpful suggestions. You should check out his similar project, SVWebViewController
.