Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
NIWebController Class Reference

Overview

A simple web view controller implementation with a toolbar.

Subclassing

This view controller implements UIWebViewDelegate. If you want to implement methods of this delegate then you should take care to call the super implementation if necessary. The following UIViewWebDelegate methods have implementations in this class:

 - webView:shouldStartLoadWithRequest:navigationType:
 - webViewDidStartLoad:
 - webViewDidFinishLoad:
 - webView:didFailLoadWithError:

This view controller also implements UIActionSheetDelegate. If you want to implement methods of this delegate then you should take care to call the super implementation if necessary. The following UIActionSheetDelegate methods have implementations in this class:

 - actionSheet:clickedButtonAtIndex:
 - actionSheet:didDismissWithButtonIndex:

In addition to the above methods of the UIActionSheetDelegate, this view controller also provides the following method, which is invoked prior to presenting the internal action sheet to the user and allows subclasses to customize the action sheet or even reject to display it (and provide their own handling instead):

 - shouldPresentActionSheet:

Recommended Configurations

Default

The default settings will create a toolbar with the default tint color, which is normally light blue on the iPhone and gray on the iPad.

Colored Toolbar

The following settings will change the toolbar tint color (in this case black)

  [webController setToolbarTintColor:[UIColor blackColor]];

Definition at line 77 of file NIWebController.h.

Inherits UIViewController.

Methods

(void) - openURL:
(void) - openRequest:
(void) - setToolbarHidden:
(void) - setToolbarTintColor:
(BOOL) - shouldPresentActionSheet:

Method Documentation

- (void) openURL: (NSURL*)  URL

Opens the given URL in the web view.

Definition at line 461 of file NIWebController.m.

- (void) openRequest: (NSURLRequest*)  request

Load the given request using UIWebView's loadRequest:.

Parameters:
requestA URL request identifying the location of the content to load.

Definition at line 468 of file NIWebController.m.

- (void) setToolbarHidden: (BOOL)  hidden

Sets the visibility of the toolbar.

If the toolbar is hidden then the web view will take up the controller's entire view.

Definition at line 483 of file NIWebController.m.

- (void) setToolbarTintColor: (UIColor*)  color

Sets the toolbar to the given color.

Definition at line 493 of file NIWebController.m.

- (BOOL) shouldPresentActionSheet: (UIActionSheet *)  actionSheet

This message is called in response to the user clicking the action toolbar button.

You can provide your own implementation in your subclass and customize the actionSheet that is shown to the user or even cancel the presentation of the actionSheet by returning NO from your implementation.

Parameters:
actionSheetThe UIActionSheet that will be presented to the user.
Returns:
YES to present the actionSheet, NO if you want to perform a custom action.

Definition at line 506 of file NIWebController.m.

Generated for Nimbus by doxygen 1.7.4-20110629