A utility control which is using fast WKWebView in replacement of UIWebView which is introduced in iOS8. Just set URL to load and it will do the rest. Very easy to implement. This is very useful when loading 'Terms of Services' OR 'Privacy Policy' web pages.
- iOS 8 and above.
- Xcode 8 and above
- Add a pod entry for
ABWebView
to your Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'ABWebView', '~> 0.1'
- Install the pod(s) by running
pod install
.
Alternatively, you can directly add all files under the folder Core to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- Open your Xcode project, then drag and drop source directory onto your project. Make sure to select Copy items when asked if you extracted the code archive outside of your project.
Create instance of ABWebViewConroller and set URLToLoad.
let webViewController = ABWebViewController()
// Configure WebViewController
webViewController.URLToLoad = "https://apple.com"
// Customize UI of progressbar
webViewController.progressTintColor = UIColor.red
webViewController.trackTintColor = UIColor.brown
navigationController?.pushViewController(webViewController, animated: true)
See example projects for detail.
This code is distributed under the terms and conditions of the MIT license.