https://github.com/sukov/webviewcontroller
Customizable In-app web browser
https://github.com/sukov/webviewcontroller
cocoapods ios-library swift uiwebview webview webviewcontroller wkwebview xcode
Last synced: 2 months ago
JSON representation
Customizable In-app web browser
- Host: GitHub
- URL: https://github.com/sukov/webviewcontroller
- Owner: sukov
- License: mit
- Created: 2017-11-25T17:11:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T22:08:52.000Z (about 7 years ago)
- Last Synced: 2025-02-05T00:47:20.933Z (3 months ago)
- Topics: cocoapods, ios-library, swift, uiwebview, webview, webviewcontroller, wkwebview, xcode
- Language: Swift
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebViewController
[](https://travis-ci.org/sukov/SHGWebViewController)
[](http://cocoapods.org/pods/SHGWebViewController)
[](http://cocoapods.org/pods/SHGWebViewController)
[](https://swift.org)
[](http://cocoapods.org/pods/SHGWebViewController) 
## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```To integrate WebViewController into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!target '' do
pod 'SHGWebViewController'
end
```#### To use with Swift 3.x please ensure that you specify version 3.0.0
```ruby
pod 'SHGWebViewController', '~> 4.0.0'
```Then, run the following command:
```bash
$ pod install
```## Usage
### Import
```swift
import WebViewController
```### WebViewControllerDelegate
```swift
func webViewController(_ webViewController: WebViewController, setupAppearanceForMain view: UIView)
func webViewControllerDidStartLoad(_ webViewController: WebViewController)
func webViewControllerDidFinishLoad(_ webViewController: WebViewController)
// default color .gray
func webViewController(_ webViewController: WebViewController, disabledTintColorFor button: UIButton) -> UIColor
// default color .blue
func webViewController(_ webViewController: WebViewController, enabledTintColorFor button: UIButton) -> UIColor
```## Author
sukov, [email protected]
## License
SHGWebViewController is available under the MIT license. See the LICENSE file for more info.