NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
A simple web view controller implementation with a toolbar.
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:
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:
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):
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.
The following settings will change the toolbar tint color (in this case black)
Tasks | |
Accessing the Toolbar | |
UIToolbar * | toolbar property |
BOOL | toolbarHidden property |
UIColor * | toolbarTintColor property |
Accessing the Web View | |
UIWebView * | webView property |
Creating a Web Controller | |
(id) | - initWithRequest: |
(id) | - initWithURL: |
Loading a Request | |
(void) | - openURL: |
(void) | - openRequest: |
(void) | - openHTMLString:baseURL: |
Subclassing the Web Controller | |
(BOOL) | - shouldPresentActionSheet: |
The toolbar.
The visibility of the toolbar.
If the toolbar is hidden then the web view will take up the controller's entire view.
The tint color of the toolbar.
The internal web view.
Initializes a newly allocated web controller with a given request.
Once the controller is presented it will begin loading the given request.
This is the designated initializer.
Initializes a newly allocated web controller with a given URL to request.
Once the controller is presented it will begin loading the given URL.
Loads a request with the given URL in the web view.
Load the given request using UIWebView's loadRequest:.
request | A URL request identifying the location of the content to load. |
Load the given request using UIWebView's loadHTMLString:baseURL:.
htmlString | The content for the main page. |
baseUrl | The base URL for the content. |
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.
actionSheet | The UIActionSheet that will be presented to the user. |