#WebBrowser A web browser using WebKit and written in Swift for iOS apps.
##How To Get Started
###Carthage
Specify "WebBrowser" in your Cartfile
:
github "teambition/WebBrowser"
###CocoaPods
Specify "WebBrowser" in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'WebBrowser'
###Usage
let webBrowserViewController = WebBrowserViewController()
// assign delegate
webBrowserViewController.delegate = self
webBrowserViewController.language = .English
webBrowserViewController.tintColor = ...
webBrowserViewController.barTintColor = ...
webBrowserViewController.toolbarHidden = false
webBrowserViewController.showActionBarButton = true
webBrowserViewController.toolbarItemSpace = 50
webBrowserViewController.showURLInNavigationBarWhenLoading = true
webBrowserViewController.showsPageTitleInNavigationBar = true
webBrowserViewController.customApplicationActivities = ...
webBrowserViewController.loadURLString("https://www.apple.com/cn/")
navigationController?.pushViewController(webBrowserViewController, animated: true)
let navigationWebBrowser = WebBrowserViewController.rootNavigationWebBrowser(webBrowser: webBrowserViewController)
presentViewController(navigationWebBrowser, animated: true, completion: nil)
func webBrowser(webBrowser: WebBrowserViewController, didStartLoadingURL URL: NSURL?) {
// do something
}
func webBrowser(webBrowser: WebBrowserViewController, didFinishLoadingURL URL: NSURL?) {
// do something
}
func webBrowser(webBrowser: WebBrowserViewController, didFailToLoadURL URL: NSURL?, error: NSError) {
// do something
}
func webBrowserWillDismiss(webBrowser: WebBrowserViewController) {
// do something
}
func webBrowserDidDismiss(webBrowser: WebBrowserViewController) {
// do something
}
iOS 8.0
##Localization WebBrowser supports 5 languages: English, Simplified Chinese, Traditional Chinese, Korean, Japanese. You can set the language when initialization.
WebBrowser is released under the MIT license. See LICENSE for details.
Have a question? Please open an issue!