TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2016 |
Maintained by Eddie Li.
Depends on: | |
SS-TUSafariActivity | = 1.0.5 |
ARChromeActivity | = 1.0.5 |
KINWebBrowser is a web browser module for your apps.
Powered by WKWebView on iOS 8. Backwards compatible with iOS 7 using UIWebView.
KINWebBrowser consists of a single component:
KINWebBrowserViewController
- a UIViewController
that contains a full featured web browser.
KINWebBrowserViewController
must be contained in a UINavigationController.
Pushing to the navigation stack:
KINWebBrowserViewController *webBrowser = [KINWebBrowserViewController webBrowser];
[self.navigationController pushViewController:webBrowser animated:YES];
[webBrowser loadURLString:@"http://www.example.com"];
Presenting Modally:
UINavigationController *webBrowserNavigationController = [KINWebBrowserViewController navigationControllerWithWebBrowser];
[self presentViewController:webBrowserNavigationController animated:YES completion:nil];
KINWebBrowserViewController *webBrowser = [webBrowserNavigationController rootWebBrowser];
[webBrowser loadURLString:@"http://www.example.com"];
platform :ios, '7.0'
pod 'KINWebBrowser'
These dependency projects should be also installed with KINWebBrowser. They are installed automatically when installing KINWebBrowser with CocoaPods.
Tint Color
The tint color of the toolbars and toolbar items can be customized.
webBrowser.tintColor = [UIColor blueColor];
webBrowser.barTintColor = [UIColor blackColor];
Title Bar Content
The URL can be shown in the UINavigationBar
while loading. The title of the page can be shown when loading completes.
webBrowser.showsURLInNavigationBar = NO;
webBrowser.showsPageTitleInNavigationBar = YES;
KINWebBrowserDelegate
ProtocolKINWebBrowserDelegate
is a set of @optional
callback methods to inform the delegate
of status changes.
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didStartLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFinishLoadingURL:(NSURL *)URL;
- (void)webBrowser:(KINWebBrowserViewController *)webBrowser didFailToLoadURL:(NSURL *)URL withError:(NSError *)error;