A WKWebView based view controller that supports adding HTTP headers and toolbar/accessory view hiding.
- Add custom
[String: String]headers to the WKWebView URL request - Toggle WKWebView toolbar & keyboard accessory view
If you're using Carthage you can add a dependency on WebHeadersController by adding it to your Cartfile:
github "kylebegeman/WebHeadersController" ~> 0.1
Push onto an existing navigation controller:
let vc = WHViewController(urlString: url, headers: headers, showToolbar: showToolbar, showKeyboardAccessory: showKeyboardAccessory)
self.navigationController?.pushViewController(vc, animated: true)Present modally with a built in navigation controller. Customize the dismiss button title; otherwise defaults to "Close"
let vc = WHModalViewController(urlString: url, headers: headers, showToolbar: showToolbar, showKeyboardAccessory: showKeyboardAccessory, dismissTitle: dismissTitle)
self.present(vc, animated: true, completion: nil)- Include error handling
- Configure with custom toolbar buttons
- Allow for UI configuration (ex: tint)
Contributions are very welcome 👍