Skip to content

Commit dea9fcc

Browse files
committed
Initial Commit
1 parent 74d5693 commit dea9fcc

File tree

15 files changed

+499
-85
lines changed

15 files changed

+499
-85
lines changed

ABWebView.podspec

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Pod::Spec.new do |s|
2+
3+
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
4+
s.name = 'ABWebView'
5+
s.version = '0.1'
6+
s.summary = 'This is pass code view controller which can be used for getting secure entry from users.'
7+
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.
9+
DESC
10+
11+
s.homepage = 'https://github.com/asifbilal786/ABWebView'
12+
s.frameworks = 'UIKit'
13+
s.requires_arc = true
14+
15+
16+
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
17+
s.license = { :type => 'MIT', :file => 'LICENSE' }
18+
19+
20+
21+
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
22+
s.author = { 'Asif Bilal' => 'asifbilal786@gmail.com' }
23+
24+
25+
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
26+
s.platform = :ios, "8.0"
27+
28+
29+
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
30+
s.source = { :git => 'https://github.com/asifbilal786/ABWebView.git', :tag => s.version }
31+
s.social_media_url = 'https://twitter.com/asifbilal786'
32+
33+
s.default_subspec = 'Source'
34+
35+
s.subspec 'Source' do |sp|
36+
sp.source_files = 'Pod', 'ABWebView/Source/*.swift'
37+
end
38+
39+
40+
end

ABWebView.xcodeproj/project.pbxproj

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,30 @@
88

99
/* Begin PBXBuildFile section */
1010
29295C851F3C682D004C7D3A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29295C841F3C682D004C7D3A /* AppDelegate.swift */; };
11-
29295C871F3C682D004C7D3A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29295C861F3C682D004C7D3A /* ViewController.swift */; };
12-
29295C8A1F3C682D004C7D3A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29295C881F3C682D004C7D3A /* Main.storyboard */; };
1311
29295C8C1F3C682D004C7D3A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29295C8B1F3C682D004C7D3A /* Assets.xcassets */; };
14-
29295C8F1F3C682D004C7D3A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29295C8D1F3C682D004C7D3A /* LaunchScreen.storyboard */; };
12+
29295C9A1F3C850A004C7D3A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29295C981F3C850A004C7D3A /* LaunchScreen.storyboard */; };
13+
29295C9B1F3C850A004C7D3A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29295C991F3C850A004C7D3A /* Main.storyboard */; };
14+
29295C9E1F3C8611004C7D3A /* ABWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29295C9C1F3C8611004C7D3A /* ABWebViewController.swift */; };
15+
29295C9F1F3C8611004C7D3A /* ABWebViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29295C9D1F3C8611004C7D3A /* ABWebViewController.xib */; };
16+
29295CA11F3CA2CF004C7D3A /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29295CA01F3CA2CF004C7D3A /* MainViewController.swift */; };
17+
29295CA51F3CB71F004C7D3A /* ABWebView.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 29295CA21F3CB71F004C7D3A /* ABWebView.podspec */; };
18+
29295CA61F3CB71F004C7D3A /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 29295CA31F3CB71F004C7D3A /* LICENSE */; };
19+
29295CA71F3CB71F004C7D3A /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 29295CA41F3CB71F004C7D3A /* README.md */; };
1520
/* End PBXBuildFile section */
1621

1722
/* Begin PBXFileReference section */
1823
29295C811F3C682D004C7D3A /* ABWebView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ABWebView.app; sourceTree = BUILT_PRODUCTS_DIR; };
1924
29295C841F3C682D004C7D3A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
20-
29295C861F3C682D004C7D3A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
21-
29295C891F3C682D004C7D3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
2225
29295C8B1F3C682D004C7D3A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
23-
29295C8E1F3C682D004C7D3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2426
29295C901F3C682D004C7D3A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27+
29295C981F3C850A004C7D3A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
28+
29295C991F3C850A004C7D3A /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
29+
29295C9C1F3C8611004C7D3A /* ABWebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ABWebViewController.swift; sourceTree = "<group>"; };
30+
29295C9D1F3C8611004C7D3A /* ABWebViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ABWebViewController.xib; sourceTree = "<group>"; };
31+
29295CA01F3CA2CF004C7D3A /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
32+
29295CA21F3CB71F004C7D3A /* ABWebView.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ABWebView.podspec; sourceTree = "<group>"; };
33+
29295CA31F3CB71F004C7D3A /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
34+
29295CA41F3CB71F004C7D3A /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
2535
/* End PBXFileReference section */
2636

2737
/* Begin PBXFrameworksBuildPhase section */
@@ -38,6 +48,9 @@
3848
29295C781F3C682D004C7D3A = {
3949
isa = PBXGroup;
4050
children = (
51+
29295CA21F3CB71F004C7D3A /* ABWebView.podspec */,
52+
29295CA31F3CB71F004C7D3A /* LICENSE */,
53+
29295CA41F3CB71F004C7D3A /* README.md */,
4154
29295C831F3C682D004C7D3A /* ABWebView */,
4255
29295C821F3C682D004C7D3A /* Products */,
4356
);
@@ -52,16 +65,34 @@
5265
sourceTree = "<group>";
5366
};
5467
29295C831F3C682D004C7D3A /* ABWebView */ = {
68+
isa = PBXGroup;
69+
children = (
70+
29295C971F3C68FA004C7D3A /* Source */,
71+
29295C961F3C68A5004C7D3A /* Example */,
72+
);
73+
path = ABWebView;
74+
sourceTree = "<group>";
75+
};
76+
29295C961F3C68A5004C7D3A /* Example */ = {
5577
isa = PBXGroup;
5678
children = (
5779
29295C841F3C682D004C7D3A /* AppDelegate.swift */,
58-
29295C861F3C682D004C7D3A /* ViewController.swift */,
59-
29295C881F3C682D004C7D3A /* Main.storyboard */,
80+
29295CA01F3CA2CF004C7D3A /* MainViewController.swift */,
81+
29295C981F3C850A004C7D3A /* LaunchScreen.storyboard */,
82+
29295C991F3C850A004C7D3A /* Main.storyboard */,
6083
29295C8B1F3C682D004C7D3A /* Assets.xcassets */,
61-
29295C8D1F3C682D004C7D3A /* LaunchScreen.storyboard */,
6284
29295C901F3C682D004C7D3A /* Info.plist */,
6385
);
64-
path = ABWebView;
86+
path = Example;
87+
sourceTree = "<group>";
88+
};
89+
29295C971F3C68FA004C7D3A /* Source */ = {
90+
isa = PBXGroup;
91+
children = (
92+
29295C9C1F3C8611004C7D3A /* ABWebViewController.swift */,
93+
29295C9D1F3C8611004C7D3A /* ABWebViewController.xib */,
94+
);
95+
path = Source;
6596
sourceTree = "<group>";
6697
};
6798
/* End PBXGroup section */
@@ -123,9 +154,12 @@
123154
isa = PBXResourcesBuildPhase;
124155
buildActionMask = 2147483647;
125156
files = (
126-
29295C8F1F3C682D004C7D3A /* LaunchScreen.storyboard in Resources */,
157+
29295CA61F3CB71F004C7D3A /* LICENSE in Resources */,
158+
29295C9F1F3C8611004C7D3A /* ABWebViewController.xib in Resources */,
159+
29295CA51F3CB71F004C7D3A /* ABWebView.podspec in Resources */,
160+
29295C9B1F3C850A004C7D3A /* Main.storyboard in Resources */,
127161
29295C8C1F3C682D004C7D3A /* Assets.xcassets in Resources */,
128-
29295C8A1F3C682D004C7D3A /* Main.storyboard in Resources */,
162+
29295C9A1F3C850A004C7D3A /* LaunchScreen.storyboard in Resources */,
129163
);
130164
runOnlyForDeploymentPostprocessing = 0;
131165
};
@@ -136,32 +170,15 @@
136170
isa = PBXSourcesBuildPhase;
137171
buildActionMask = 2147483647;
138172
files = (
139-
29295C871F3C682D004C7D3A /* ViewController.swift in Sources */,
173+
29295CA11F3CA2CF004C7D3A /* MainViewController.swift in Sources */,
174+
29295C9E1F3C8611004C7D3A /* ABWebViewController.swift in Sources */,
175+
29295CA71F3CB71F004C7D3A /* README.md in Sources */,
140176
29295C851F3C682D004C7D3A /* AppDelegate.swift in Sources */,
141177
);
142178
runOnlyForDeploymentPostprocessing = 0;
143179
};
144180
/* End PBXSourcesBuildPhase section */
145181

146-
/* Begin PBXVariantGroup section */
147-
29295C881F3C682D004C7D3A /* Main.storyboard */ = {
148-
isa = PBXVariantGroup;
149-
children = (
150-
29295C891F3C682D004C7D3A /* Base */,
151-
);
152-
name = Main.storyboard;
153-
sourceTree = "<group>";
154-
};
155-
29295C8D1F3C682D004C7D3A /* LaunchScreen.storyboard */ = {
156-
isa = PBXVariantGroup;
157-
children = (
158-
29295C8E1F3C682D004C7D3A /* Base */,
159-
);
160-
name = LaunchScreen.storyboard;
161-
sourceTree = "<group>";
162-
};
163-
/* End PBXVariantGroup section */
164-
165182
/* Begin XCBuildConfiguration section */
166183
29295C911F3C682D004C7D3A /* Debug */ = {
167184
isa = XCBuildConfiguration;
@@ -260,7 +277,8 @@
260277
isa = XCBuildConfiguration;
261278
buildSettings = {
262279
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
263-
INFOPLIST_FILE = ABWebView/Info.plist;
280+
INFOPLIST_FILE = "$(SRCROOT)/ABWebView/Example/Info.plist";
281+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
264282
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
265283
PRODUCT_BUNDLE_IDENTIFIER = com.asifbilal.ABWebView;
266284
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -272,7 +290,8 @@
272290
isa = XCBuildConfiguration;
273291
buildSettings = {
274292
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275-
INFOPLIST_FILE = ABWebView/Info.plist;
293+
INFOPLIST_FILE = "$(SRCROOT)/ABWebView/Example/Info.plist";
294+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
276295
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
277296
PRODUCT_BUNDLE_IDENTIFIER = com.asifbilal.ABWebView;
278297
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -299,6 +318,7 @@
299318
29295C951F3C682D004C7D3A /* Release */,
300319
);
301320
defaultConfigurationIsVisible = 0;
321+
defaultConfigurationName = Release;
302322
};
303323
/* End XCConfigurationList section */
304324
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
</Bucket>

ABWebView/Base.lproj/Main.storyboard

Lines changed: 0 additions & 26 deletions
This file was deleted.
File renamed without changes.

ABWebView/Assets.xcassets/AppIcon.appiconset/Contents.json renamed to ABWebView/Example/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",
File renamed without changes.

ABWebView/Example/Main.storyboard

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jM4-Z0-s9Q">
3+
<device id="retina4_7" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
6+
<dependencies>
7+
<deployment identifier="iOS"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10+
</dependencies>
11+
<scenes>
12+
<!--Main View Controller-->
13+
<scene sceneID="tne-QT-ifu">
14+
<objects>
15+
<viewController id="BYZ-38-t0r" customClass="MainViewController" customModule="ABWebView" customModuleProvider="target" sceneMemberID="viewController">
16+
<layoutGuides>
17+
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
18+
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
19+
</layoutGuides>
20+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
21+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
22+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
23+
<subviews>
24+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x5d-7e-XUl">
25+
<rect key="frame" x="101" y="318.5" width="173" height="30"/>
26+
<state key="normal" title="Load Web view controller"/>
27+
<connections>
28+
<action selector="loadWebViewController:" destination="BYZ-38-t0r" eventType="touchUpInside" id="V85-aN-41Q"/>
29+
</connections>
30+
</button>
31+
</subviews>
32+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
33+
<constraints>
34+
<constraint firstItem="x5d-7e-XUl" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="4P2-EJ-m3o"/>
35+
<constraint firstItem="x5d-7e-XUl" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="Ahl-sj-VIX"/>
36+
</constraints>
37+
</view>
38+
<navigationItem key="navigationItem" id="UDj-wK-6nh"/>
39+
</viewController>
40+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
41+
</objects>
42+
<point key="canvasLocation" x="951" y="777"/>
43+
</scene>
44+
<!--Navigation Controller-->
45+
<scene sceneID="1T1-2z-5B5">
46+
<objects>
47+
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="jM4-Z0-s9Q" sceneMemberID="viewController">
48+
<extendedEdge key="edgesForExtendedLayout"/>
49+
<toolbarItems/>
50+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Bkn-iR-TML">
51+
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
52+
<autoresizingMask key="autoresizingMask"/>
53+
</navigationBar>
54+
<nil name="viewControllers"/>
55+
<connections>
56+
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="CLr-d4-E3X"/>
57+
</connections>
58+
</navigationController>
59+
<placeholder placeholderIdentifier="IBFirstResponder" id="mdQ-4t-ruW" userLabel="First Responder" sceneMemberID="firstResponder"/>
60+
</objects>
61+
<point key="canvasLocation" x="116" y="776.76161919040487"/>
62+
</scene>
63+
</scenes>
64+
</document>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// MainViewController.swift
3+
// ABWebView
4+
//
5+
// Created by Asif Bilal on 10/08/2017.
6+
// Copyright © 2017 Asif Bilal. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
class MainViewController: UIViewController {
12+
13+
override func viewDidLoad() {
14+
super.viewDidLoad()
15+
16+
// Do any additional setup after loading the view.
17+
}
18+
19+
override func didReceiveMemoryWarning() {
20+
super.didReceiveMemoryWarning()
21+
// Dispose of any resources that can be recreated.
22+
}
23+
24+
@IBAction func loadWebViewController(_ sender: Any) {
25+
26+
let webViewController = ABWebViewController()
27+
webViewController.URLToLoad = "https://apple.com"
28+
navigationController?.pushViewController(webViewController, animated: true)
29+
30+
}
31+
32+
}

0 commit comments

Comments
 (0)