Skip to content

Commit a68844b

Browse files
committed
Updated code and Gif for project.
1 parent 019922f commit a68844b

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

ABWebView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Pod::Spec.new do |s|
55
s.version = '0.1'
66
s.summary = 'This is web view controller which can be used for loading URL using WKWebView.'
77
s.description = <<-DESC
8-
A utility control which is using fast WKWebView which is introduced in iOS8. Just set URL to load and it will do the rest. Very easy to implement.
8+
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.
99
DESC
1010

1111
s.homepage = 'https://github.com/asifbilal786/ABWebView'

ABWebView/Example/MainViewController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ class MainViewController: UIViewController {
2424
@IBAction func loadWebViewController(_ sender: Any) {
2525

2626
let webViewController = ABWebViewController()
27+
28+
// Configure WebViewController
2729
webViewController.URLToLoad = "https://apple.com"
30+
31+
// Customize UI of progressbar
32+
webViewController.progressTintColor = UIColor.red
33+
webViewController.trackTintColor = UIColor.brown
34+
35+
2836
navigationController?.pushViewController(webViewController, animated: true)
2937

3038
}

ABWebView/Source/ABWebViewController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class ABWebViewController: UIViewController {
1717
fileprivate let keyEstimateProgress = "estimatedProgress"
1818

1919

20-
var URLToLoad: String = ""
20+
open var URLToLoad: String = ""
21+
open var progressTintColor : UIColor?
22+
open var trackTintColor : UIColor?
2123
fileprivate var webView: WKWebView
2224

2325
@IBOutlet fileprivate weak var loadingProgress: UIProgressView!
@@ -61,10 +63,15 @@ class ABWebViewController: UIViewController {
6163

6264
fileprivate func viewConfigurations() {
6365

66+
67+
//These are the changes for UnderTopBars & UnderBottomBars
6468
edgesForExtendedLayout = []
6569
extendedLayoutIncludesOpaqueBars = false
6670
automaticallyAdjustsScrollViewInsets = false
6771

72+
loadingProgress.trackTintColor = trackTintColor
73+
loadingProgress.progressTintColor = progressTintColor
74+
6875
webViewContainer.addSubview(webView)
6976
webView.translatesAutoresizingMaskIntoConstraints = false
7077

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# ABWebView
2-
A utility control which is using fast WKWebView which is introduced in iOS8. Just set URL to load and it will do the rest. Very easy to implement.
2+
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.
33

44
## Demo
5-
![gif1](https://raw.githubusercontent.com/asifbilal786/ABPasscodeViewController/screenshots/ABPasscode.gif)
5+
![gif1](http://imgur.com/oDjeUJh)
66

77
## Requirements
88

99
- iOS 8 and above.
1010
- Xcode 8 and above
1111

1212

13-
## Adding ABPasscodeViewController to your project
13+
## Adding ABWebViewController to your project
1414

1515
### METHOD 1:
1616
1. Add a pod entry for `ABWebView` to your Podfile
@@ -28,21 +28,13 @@ pod 'ABWebView', '~> 0.1'
2828
### MEHTOD 2: (Source files)
2929
Alternatively, you can directly add all files under the folder Core to your project.
3030

31-
1. Download the [latest code version](https://github.com/asifbilal786/ABWebView/archive/master.zip) or add the repository as a git submodule to your git-tracked project.
31+
1. Download the [latest code version](https://github.com/asifbilal786/ABWebViewController/archive/master.zip) or add the repository as a git submodule to your git-tracked project.
3232
2. 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.
3333

3434

3535
## Usage
3636

37-
Create instance variable of PhotoPicker in your view controller and push in navigation controller.
38-
39-
```
40-
let passcodeVC = PasscodeViewController()
41-
passcodeVC.delegate = self
42-
navigationController?.pushViewController(passcodeVC, animated: true)
43-
```
44-
45-
And then call the delegate functions for different event.
37+
Create instance of ABWebViewConroller and set URLToLoad.
4638

4739
```
4840
let webViewController = ABWebViewController()

0 commit comments

Comments
 (0)