"];
322 | NSInteger location = t.location + t.length;
323 |
324 | NSString *t_object = [NSString stringWithFormat:@"
%@
",object];
325 | [mut_str insertString:t_object atIndex:location];
326 |
327 | [_readerWebView loadHTMLString:mut_str baseURL:self.url];
328 | _readerWebView.alpha = 0.0f;
329 |
330 | [_webView evaluateJavaScript:@"ReaderArticleFinderJS.prepareToTransitionToReader();" completionHandler:^(id _Nullable object, NSError * _Nullable error) {}];
331 | }];
332 | }
333 | }];
334 | } else {
335 | [UIView animateWithDuration:0.2f animations:^{
336 | self.webMaskView.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.0f];
337 | self.maskLayer.frame = CGRectMake(0.0f, 0.0f, _readerWebView.frame.size.width, 0.0f);
338 | } completion:^(BOOL finished) {
339 | _readerWebView.userInteractionEnabled = NO;
340 | }];
341 | }
342 | }
343 |
344 | - (void)webViewToolbarOpenInSafari:(PFWebViewToolBar *)toolbar {
345 | UIApplication *application = [UIApplication sharedApplication];
346 | #ifndef __IPHONE_10_0
347 | #define __IPHONE_10_0 100000
348 | #endif
349 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
350 | if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
351 | [application openURL:self.webView.URL options:@{} completionHandler:nil];
352 | } else {
353 | [application openURL:self.webView.URL];
354 | }
355 | #else
356 | [application openURL:self.webView.URL];
357 | #endif
358 | }
359 |
360 | - (void)webViewToolbarClose:(PFWebViewToolBar *)toolbar {
361 | if (self.navigationController) {
362 | [self.navigationController popViewControllerAnimated:YES];
363 | } else {
364 | [self dismissViewControllerAnimated:YES completion:nil];
365 | }
366 | }
367 |
368 | #pragma mark - WKWebViewNavigationDelegate Methods
369 |
370 | - (void)webView:(WKWebView *)webView didCommitNavigation:(null_unspecified WKNavigation *)navigation {
371 | if ([webView isEqual:self.readerWebView]) {
372 | return;
373 | }
374 |
375 | if (![self.webView.URL.absoluteString isEqualToString:@"about:blank"]) {
376 | // Cache current url after every frame entering if not blank page
377 | self.url = self.webView.URL;
378 | isReaderMode = NO;
379 |
380 | self.toolbar.readerModeBtn.selected = NO;
381 |
382 | // Set reader mode button enabled NO when begin navigation
383 | self.toolbar.readerModeBtn.enabled = NO;
384 | }
385 | }
386 |
387 | - (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation {
388 | if (webView == _webView) {
389 | // Set reader mode button status when navigation finished
390 | [webView evaluateJavaScript:@"var ReaderArticleFinderJS = new ReaderArticleFinder(document); ReaderArticleFinderJS.isReaderModeAvailable();" completionHandler:^(id _Nullable object, NSError * _Nullable error) {
391 | if ([object integerValue] == 1) {
392 | self.toolbar.readerModeBtn.enabled = YES;
393 | } else {
394 | self.toolbar.readerModeBtn.enabled = NO;
395 | }
396 | }];
397 | }
398 | }
399 |
400 | // 拦截非 Http:// 和 Https:// 开头的请求,转成应用内跳转
401 | - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
402 | if ([webView isEqual:self.readerWebView]) {
403 | decisionHandler(WKNavigationActionPolicyAllow);
404 | return;
405 | }
406 |
407 | if (![navigationAction.request.URL.absoluteString containsString:@"http://"] && ![navigationAction.request.URL.absoluteString containsString:@"https://"]) {
408 |
409 | UIApplication *application = [UIApplication sharedApplication];
410 | #ifndef __IPHONE_10_0
411 | #define __IPHONE_10_0 100000
412 | #endif
413 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
414 | if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
415 | [application openURL:navigationAction.request.URL options:@{} completionHandler:nil];
416 | } else {
417 | [application openURL:navigationAction.request.URL];
418 | }
419 | #else
420 | [application openURL:navigationAction.request.URL];
421 | #endif
422 | decisionHandler(WKNavigationActionPolicyCancel);
423 | } else {
424 | decisionHandler(WKNavigationActionPolicyAllow);
425 | }
426 | }
427 |
428 | - (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler {
429 | decisionHandler(WKNavigationResponsePolicyAllow);
430 | }
431 |
432 | - (void)userContentController:(WKUserContentController *)userContentController
433 | didReceiveScriptMessage:(WKScriptMessage *)message {
434 | _readerWebView.alpha = 1.0f;
435 |
436 | dispatch_async(dispatch_get_main_queue(), ^{
437 | [UIView animateWithDuration:0.1f delay:0.2f options:UIViewAnimationOptionCurveEaseInOut animations:^{
438 | self.webMaskView.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.4f];
439 | self.maskLayer.frame = CGRectMake(0.0f, 0.0f, _readerWebView.frame.size.width, _readerWebView.frame.size.height);
440 | } completion:^(BOOL finished) {
441 | _readerWebView.userInteractionEnabled = YES;
442 | }];
443 | });
444 |
445 | }
446 |
447 | @end
448 |
--------------------------------------------------------------------------------
/Classes/PFWebViewNavigationHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // PFWebViewNavigationHeader.h
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PFWebViewNavigationHeader : UIView
12 |
13 | - (id)initWithURL:(NSURL *)url;
14 | - (void)setURL:(NSURL *)url;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Classes/PFWebViewNavigationHeader.m:
--------------------------------------------------------------------------------
1 | //
2 | // PFWebViewNavigationHeader.m
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import "PFWebViewNavigationHeader.h"
10 | #import
11 |
12 | #define SCREENWIDTH [UIScreen mainScreen].bounds.size.width
13 | #define SCREENHEIGHT [UIScreen mainScreen].bounds.size.height
14 |
15 | @interface PFWebViewNavigationHeader ()
16 | @property (nonatomic, assign) CGFloat offset;
17 | @property (nonatomic, strong) UIView *bottomLine;
18 | @property (nonatomic, strong) UILabel *urlLabel;
19 | @end
20 |
21 | @implementation PFWebViewNavigationHeader
22 |
23 | - (id)initWithURL:(NSURL *)url {
24 | self.offset = SCREENWIDTH < SCREENHEIGHT ? 20.f : 0.f;
25 | self = [super initWithFrame:CGRectMake(0, 0, SCREENWIDTH, 20.5f + self.offset)];
26 | if (self) {
27 | self.urlLabel.text = [url host];
28 | [self setup];
29 | }
30 | return self;
31 | }
32 |
33 | - (void)setURL:(NSURL *)url {
34 | self.urlLabel.text = [url host];
35 | }
36 |
37 | - (void)setup {
38 | self.backgroundColor = [UIColor whiteColor];
39 | [self addSubview:self.urlLabel];
40 | [self addSubview:self.bottomLine];
41 | }
42 |
43 | - (void)layoutSubviews {
44 | [super layoutSubviews];
45 | self.offset = SCREENWIDTH < SCREENHEIGHT ? 20.f : 0.f;
46 | self.frame = CGRectMake(0, 0, SCREENWIDTH, 20.5f + self.offset);
47 | self.urlLabel.frame = CGRectMake(0, self.offset, SCREENWIDTH, 20);
48 | self.bottomLine.frame = CGRectMake(0, 20 + self.offset, SCREENWIDTH, .5f);
49 | }
50 |
51 | - (UILabel *)urlLabel {
52 | if (!_urlLabel) {
53 | _urlLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.offset, SCREENWIDTH, 20)];
54 | _urlLabel.textAlignment = NSTextAlignmentCenter;
55 | _urlLabel.font = [UIFont systemFontOfSize:11];
56 | _urlLabel.numberOfLines = 1;
57 | }
58 | return _urlLabel;
59 | }
60 |
61 | - (UIView *)bottomLine {
62 | if (!_bottomLine) {
63 | _bottomLine = [[UIView alloc] initWithFrame:CGRectMake(0, 20 + self.offset, SCREENWIDTH, .5f)];
64 | _bottomLine.backgroundColor = [UIColor colorWithRed:234.f/255.f green:237.f/255.f blue:242.f/255.f alpha:1.f];
65 | }
66 | return _bottomLine;
67 | }
68 | /*
69 | // Only override drawRect: if you perform custom drawing.
70 | // An empty implementation adversely affects performance during animation.
71 | - (void)drawRect:(CGRect)rect {
72 | // Drawing code
73 | }
74 | */
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/Classes/PFWebViewToolBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // PFWebViewToolBar.h
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class PFWebViewToolBar;
12 |
13 | @protocol PFWebViewToolBarDelegate
14 |
15 | - (void)webViewToolbarGoBack:(PFWebViewToolBar *)toolbar;
16 | - (void)webViewToolbarGoForward:(PFWebViewToolBar *)toolbar;
17 | - (void)webViewToolbarOpenInSafari:(PFWebViewToolBar *)toolbar;
18 | - (void)webViewToolbarClose:(PFWebViewToolBar *)toolbar;
19 | - (void)webViewToolbarDidSwitchReaderMode:(PFWebViewToolBar *)toolbar;
20 |
21 | @end
22 |
23 | @interface PFWebViewToolBar : UIView
24 |
25 | @property (weak, nonatomic) id delegate;
26 |
27 | @property (weak, nonatomic) IBOutlet UIButton *closeBtn;
28 | @property (weak, nonatomic) IBOutlet UIButton *backBtn;
29 | @property (weak, nonatomic) IBOutlet UIButton *forwardBtn;
30 | @property (weak, nonatomic) IBOutlet UIButton *openInSafariBtn;
31 | @property (weak, nonatomic) IBOutlet UIButton *readerModeBtn;
32 |
33 | - (void)setup;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/Classes/PFWebViewToolBar.m:
--------------------------------------------------------------------------------
1 | //
2 | // PFWebViewToolBar.m
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import "PFWebViewToolBar.h"
10 |
11 | @implementation PFWebViewToolBar
12 |
13 | #pragma mark - Life cycle
14 |
15 | - (id)initWithFrame:(CGRect)frame {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"PFWebViewController" ofType:@"bundle"]];
19 | NSString *className = NSStringFromClass([self class]);
20 | self = [[bundle loadNibNamed:className owner:self options:nil] firstObject];
21 | self.frame = frame;
22 | }
23 | return self;
24 | }
25 |
26 | - (void)setup {
27 | NSBundle *bundle = [NSBundle bundleForClass:[self class]];
28 | NSURL *url = [bundle URLForResource:@"PFWebViewController" withExtension:@"bundle"];
29 | NSBundle *imageBundle = [NSBundle bundleWithURL:url];
30 |
31 | NSString *closeImagePath = [imageBundle pathForResource:@"icon_close" ofType:@"png"];
32 | NSString *backImagePath = [imageBundle pathForResource:@"icon_back" ofType:@"png"];
33 | NSString *backDisableImagePath = [imageBundle pathForResource:@"icon_back_disable" ofType:@"png"];
34 | NSString *forwardImagePath = [imageBundle pathForResource:@"icon_next" ofType:@"png"];
35 | NSString *forwardDisableImagePath = [imageBundle pathForResource:@"icon_next_disable" ofType:@"png"];
36 | NSString *safariImagePath = [imageBundle pathForResource:@"icon_safari" ofType:@"png"];
37 | NSString *readerModeImagePath = [imageBundle pathForResource:@"icon_read" ofType:@"png"];
38 | NSString *readerModeDisableImagePath = [imageBundle pathForResource:@"icon_read_disable" ofType:@"png"];
39 | NSString *readerModeSelectedImagePath = [imageBundle pathForResource:@"icon_read_back" ofType:@"png"];
40 |
41 | [self.closeBtn setImage:[UIImage imageWithContentsOfFile:closeImagePath]
42 | forState:UIControlStateNormal];
43 | [self.backBtn setImage:[UIImage imageWithContentsOfFile:backImagePath]
44 | forState:UIControlStateNormal];
45 | [self.backBtn setImage:[UIImage imageWithContentsOfFile:backDisableImagePath]
46 | forState:UIControlStateDisabled];
47 | [self.forwardBtn setImage:[UIImage imageWithContentsOfFile:forwardImagePath]
48 | forState:UIControlStateNormal];
49 | [self.forwardBtn setImage:[UIImage imageWithContentsOfFile:forwardDisableImagePath]
50 | forState:UIControlStateDisabled];
51 | [self.openInSafariBtn setImage:[UIImage imageWithContentsOfFile:safariImagePath]
52 | forState:UIControlStateNormal];
53 | [self.readerModeBtn setImage:[UIImage imageWithContentsOfFile:readerModeImagePath] forState:UIControlStateNormal];
54 | [self.readerModeBtn setImage:[UIImage imageWithContentsOfFile:readerModeDisableImagePath] forState:UIControlStateDisabled];
55 | [self.readerModeBtn setImage:[UIImage imageWithContentsOfFile:readerModeSelectedImagePath] forState:UIControlStateSelected];
56 |
57 | self.readerModeBtn.selected = NO;
58 | self.readerModeBtn.enabled = NO;
59 |
60 | self.backBtn.enabled = NO;
61 | self.forwardBtn.enabled = NO;
62 | }
63 |
64 | #pragma mark - Event response
65 |
66 | - (IBAction)close:(UIButton *)sender {
67 | if (self.delegate) {
68 | [self.delegate webViewToolbarClose:self];
69 | }
70 | }
71 |
72 | - (IBAction)goBack:(UIButton *)sender {
73 | if (self.delegate) {
74 | [self.delegate webViewToolbarGoBack:self];
75 | }
76 | }
77 |
78 | - (IBAction)goForward:(UIButton *)sender {
79 | if (self.delegate) {
80 | [self.delegate webViewToolbarGoForward:self];
81 | }
82 | }
83 |
84 | - (IBAction)openInSafari:(UIButton *)sender {
85 | if (self.delegate) {
86 | [self.delegate webViewToolbarOpenInSafari:self];
87 | }
88 | }
89 |
90 | - (IBAction)switchReaderMode:(id)sender {
91 | if ([self.delegate respondsToSelector:@selector(webViewToolbarDidSwitchReaderMode:)]) {
92 | [self.delegate webViewToolbarDidSwitchReaderMode:self];
93 | self.readerModeBtn.selected = !self.readerModeBtn.selected;
94 | }
95 | }
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/Classes/PFWebViewToolBar.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
34 |
40 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Cee Cirno
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the"Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/PFWebViewController.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint PFWebViewController.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 |
11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
12 | #
13 | # These will help people to find your library, and whilst it
14 | # can feel like a chore to fill in it's definitely to your advantage. The
15 | # summary should be tweet-length, and the description more in depth.
16 | #
17 |
18 | s.name = "PFWebViewController"
19 | s.version = "1.1.1"
20 | s.summary = "A light-weight webview controller using WKWebView. Support Safari-like reader mode."
21 |
22 | # This description is used to generate tags and improve search results.
23 | # * Think: What does it do? Why did you write it? What is the focus?
24 | # * Try to keep it short, snappy and to the point.
25 | # * Write the description between the DESC delimiters below.
26 | # * Finally, don't worry about the indent, CocoaPods strips it!
27 | s.description = <<-DESC
28 | A light-weight webview controller using WKWebView. It contains a progress bar and can estimate loading time.
29 |
30 | Support Safari-like reader mode.
31 |
32 | Easy use and less memory consuming than [RxWebViewController](https://github.com/Roxasora/RxWebViewController).
33 | DESC
34 |
35 | s.homepage = "https://github.com/PerfectFreeze/PFWebViewController"
36 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
37 |
38 |
39 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
40 | #
41 | # Licensing your code is important. See http://choosealicense.com for more info.
42 | # CocoaPods will detect a license file if there is a named LICENSE*
43 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
44 | #
45 |
46 | # s.license = "MIT (example)"
47 | s.license = { :type => "MIT", :file => "LICENSE" }
48 |
49 |
50 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
51 | #
52 | # Specify the authors of the library, with email addresses. Email addresses
53 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
54 | # accepts just a name if you'd rather not provide an email address.
55 | #
56 | # Specify a social_media_url where others can refer to, for example a twitter
57 | # profile URL.
58 | #
59 |
60 | s.author = { "Cee" => "cee@chu2byo.com" }
61 | # Or just: s.author = "Cee"
62 | # s.authors = { "Cee" => "cee@chu2byo.com" }
63 | s.social_media_url = "https://twitter.com/ceecirno"
64 |
65 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
66 | #
67 | # If this Pod runs only on iOS or OS X, then specify the platform and
68 | # the deployment target. You can optionally include the target after the platform.
69 | #
70 |
71 | # s.platform = :ios
72 | s.platform = :ios, "9.0"
73 |
74 | # When using multiple platforms
75 | # s.ios.deployment_target = "5.0"
76 | # s.osx.deployment_target = "10.7"
77 | # s.watchos.deployment_target = "2.0"
78 | # s.tvos.deployment_target = "9.0"
79 |
80 |
81 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
82 | #
83 | # Specify the location from where the source should be retrieved.
84 | # Supports git, hg, bzr, svn and HTTP.
85 | #
86 |
87 | s.source = { :git => "https://github.com/PerfectFreeze/PFWebViewController.git", :tag => "v#{s.version.to_s}" }
88 |
89 |
90 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
91 | #
92 | # CocoaPods is smart about how it includes source code. For source files
93 | # giving a folder will include any swift, h, m, mm, c & cpp files.
94 | # For header files it will include any header in the folder.
95 | # Not including the public_header_files will make all headers public.
96 | #
97 |
98 | s.source_files = "Classes", "Classes/**/*.{h,m}"
99 | s.exclude_files = "Classes/Exclude"
100 |
101 | # s.public_header_files = "Classes/**/*.h"
102 |
103 |
104 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
105 | #
106 | # A list of resources included with the Pod. These are copied into the
107 | # target bundle with a build phase script. Anything else will be cleaned.
108 | # You can preserve files from being cleaned, please don't preserve
109 | # non-essential files like tests, examples and documentation.
110 | #
111 |
112 | # s.resource = "icon.png"
113 | s.resources = "Classes/*.bundle"
114 |
115 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
116 |
117 |
118 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
119 | #
120 | # Link your library with frameworks, or libraries. Libraries do not include
121 | # the lib prefix of their name.
122 | #
123 |
124 | # s.framework = "SomeFramework"
125 | # s.frameworks = "SomeFramework", "AnotherFramework"
126 |
127 | # s.library = "iconv"
128 | # s.libraries = "iconv", "xml2"
129 |
130 |
131 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
132 | #
133 | # If your library depends on compiler flags you can set them in the xcconfig hash
134 | # where they will only apply to your library. If you depend on other Podspecs
135 | # you can include multiple dependencies to ensure it works.
136 |
137 | s.requires_arc = true
138 |
139 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
140 | # s.dependency "JSONKit", "~> 1.4"
141 |
142 | end
143 |
--------------------------------------------------------------------------------
/PFWebViewController.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 921A45CA1D95870E0040BE3B /* PFWebViewController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 921A45C31D95870E0040BE3B /* PFWebViewController.framework */; };
11 | 921A45CB1D95870E0040BE3B /* PFWebViewController.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 921A45C31D95870E0040BE3B /* PFWebViewController.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12 | 921A45D01D9587300040BE3B /* PFWebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 927D6EA51D9127420066D7BC /* PFWebViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 921A45D11D9587440040BE3B /* PFWebViewNavigationHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 927D6EA71D9127420066D7BC /* PFWebViewNavigationHeader.h */; settings = {ATTRIBUTES = (Private, ); }; };
14 | 921A45D21D9587440040BE3B /* PFWebViewToolBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 927D6EA91D9127420066D7BC /* PFWebViewToolBar.h */; settings = {ATTRIBUTES = (Private, ); }; };
15 | 921A45D31D95875A0040BE3B /* PFWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EA61D9127420066D7BC /* PFWebViewController.m */; };
16 | 921A45D41D95875A0040BE3B /* PFWebViewNavigationHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EA81D9127420066D7BC /* PFWebViewNavigationHeader.m */; };
17 | 921A45D51D95875A0040BE3B /* PFWebViewToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EAA1D9127420066D7BC /* PFWebViewToolBar.m */; };
18 | 921A45D61D9587600040BE3B /* PFWebViewController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 927D6EA41D9127420066D7BC /* PFWebViewController.bundle */; };
19 | 927D6EAC1D9127420066D7BC /* PFWebViewController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 927D6EA41D9127420066D7BC /* PFWebViewController.bundle */; };
20 | 927D6EAD1D9127420066D7BC /* PFWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EA61D9127420066D7BC /* PFWebViewController.m */; };
21 | 927D6EAE1D9127420066D7BC /* PFWebViewNavigationHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EA81D9127420066D7BC /* PFWebViewNavigationHeader.m */; };
22 | 927D6EAF1D9127420066D7BC /* PFWebViewToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 927D6EAA1D9127420066D7BC /* PFWebViewToolBar.m */; };
23 | 928771851D8FDAF400491C20 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 928771841D8FDAF400491C20 /* main.m */; };
24 | 928771881D8FDAF400491C20 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 928771871D8FDAF400491C20 /* AppDelegate.m */; };
25 | 9287718B1D8FDAF400491C20 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9287718A1D8FDAF400491C20 /* ViewController.m */; };
26 | 9287718E1D8FDAF400491C20 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9287718C1D8FDAF400491C20 /* Main.storyboard */; };
27 | 928771901D8FDAF400491C20 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9287718F1D8FDAF400491C20 /* Assets.xcassets */; };
28 | 928771931D8FDAF400491C20 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 928771911D8FDAF400491C20 /* LaunchScreen.storyboard */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 921A45C81D95870E0040BE3B /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 928771781D8FDAF400491C20 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 921A45C21D95870E0040BE3B;
37 | remoteInfo = PFWebViewControllerFramework;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXCopyFilesBuildPhase section */
42 | 921A45CF1D95870E0040BE3B /* Embed Frameworks */ = {
43 | isa = PBXCopyFilesBuildPhase;
44 | buildActionMask = 2147483647;
45 | dstPath = "";
46 | dstSubfolderSpec = 10;
47 | files = (
48 | 921A45CB1D95870E0040BE3B /* PFWebViewController.framework in Embed Frameworks */,
49 | );
50 | name = "Embed Frameworks";
51 | runOnlyForDeploymentPostprocessing = 0;
52 | };
53 | /* End PBXCopyFilesBuildPhase section */
54 |
55 | /* Begin PBXFileReference section */
56 | 50E32DDB1DACFA9D00906C27 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
57 | 921A45C31D95870E0040BE3B /* PFWebViewController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PFWebViewController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 921A45C51D95870E0040BE3B /* PFWebViewControllerFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PFWebViewControllerFramework.h; sourceTree = ""; };
59 | 921A45C61D95870E0040BE3B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
60 | 927D6EA41D9127420066D7BC /* PFWebViewController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = PFWebViewController.bundle; sourceTree = ""; };
61 | 927D6EA51D9127420066D7BC /* PFWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFWebViewController.h; sourceTree = ""; };
62 | 927D6EA61D9127420066D7BC /* PFWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFWebViewController.m; sourceTree = ""; };
63 | 927D6EA71D9127420066D7BC /* PFWebViewNavigationHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFWebViewNavigationHeader.h; sourceTree = ""; };
64 | 927D6EA81D9127420066D7BC /* PFWebViewNavigationHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFWebViewNavigationHeader.m; sourceTree = ""; };
65 | 927D6EA91D9127420066D7BC /* PFWebViewToolBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PFWebViewToolBar.h; sourceTree = ""; };
66 | 927D6EAA1D9127420066D7BC /* PFWebViewToolBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PFWebViewToolBar.m; sourceTree = ""; };
67 | 927D6EB11D912A600066D7BC /* PFWebViewToolBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PFWebViewToolBar.xib; sourceTree = ""; };
68 | 928771801D8FDAF400491C20 /* PFWebViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PFWebViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
69 | 928771841D8FDAF400491C20 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
70 | 928771861D8FDAF400491C20 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
71 | 928771871D8FDAF400491C20 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
72 | 928771891D8FDAF400491C20 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
73 | 9287718A1D8FDAF400491C20 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
74 | 9287718D1D8FDAF400491C20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
75 | 9287718F1D8FDAF400491C20 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
76 | 928771921D8FDAF400491C20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
77 | 928771941D8FDAF400491C20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
78 | /* End PBXFileReference section */
79 |
80 | /* Begin PBXFrameworksBuildPhase section */
81 | 921A45BF1D95870E0040BE3B /* Frameworks */ = {
82 | isa = PBXFrameworksBuildPhase;
83 | buildActionMask = 2147483647;
84 | files = (
85 | );
86 | runOnlyForDeploymentPostprocessing = 0;
87 | };
88 | 9287717D1D8FDAF400491C20 /* Frameworks */ = {
89 | isa = PBXFrameworksBuildPhase;
90 | buildActionMask = 2147483647;
91 | files = (
92 | 921A45CA1D95870E0040BE3B /* PFWebViewController.framework in Frameworks */,
93 | );
94 | runOnlyForDeploymentPostprocessing = 0;
95 | };
96 | /* End PBXFrameworksBuildPhase section */
97 |
98 | /* Begin PBXGroup section */
99 | 50E32DDA1DACFA9D00906C27 /* Frameworks */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 50E32DDB1DACFA9D00906C27 /* libxml2.tbd */,
103 | );
104 | name = Frameworks;
105 | sourceTree = "";
106 | };
107 | 921A45C41D95870E0040BE3B /* PFWebViewControllerFramework */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 921A45C51D95870E0040BE3B /* PFWebViewControllerFramework.h */,
111 | 921A45C61D95870E0040BE3B /* Info.plist */,
112 | );
113 | path = PFWebViewControllerFramework;
114 | sourceTree = "";
115 | };
116 | 927D6EA31D9127420066D7BC /* Classes */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 927D6EA41D9127420066D7BC /* PFWebViewController.bundle */,
120 | 927D6EA51D9127420066D7BC /* PFWebViewController.h */,
121 | 927D6EA61D9127420066D7BC /* PFWebViewController.m */,
122 | 927D6EA71D9127420066D7BC /* PFWebViewNavigationHeader.h */,
123 | 927D6EA81D9127420066D7BC /* PFWebViewNavigationHeader.m */,
124 | 927D6EA91D9127420066D7BC /* PFWebViewToolBar.h */,
125 | 927D6EAA1D9127420066D7BC /* PFWebViewToolBar.m */,
126 | 927D6EB11D912A600066D7BC /* PFWebViewToolBar.xib */,
127 | );
128 | path = Classes;
129 | sourceTree = "";
130 | };
131 | 928771771D8FDAF400491C20 = {
132 | isa = PBXGroup;
133 | children = (
134 | 927D6EA31D9127420066D7BC /* Classes */,
135 | 928771821D8FDAF400491C20 /* PFWebViewController */,
136 | 921A45C41D95870E0040BE3B /* PFWebViewControllerFramework */,
137 | 928771811D8FDAF400491C20 /* Products */,
138 | 50E32DDA1DACFA9D00906C27 /* Frameworks */,
139 | );
140 | sourceTree = "";
141 | };
142 | 928771811D8FDAF400491C20 /* Products */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 928771801D8FDAF400491C20 /* PFWebViewController.app */,
146 | 921A45C31D95870E0040BE3B /* PFWebViewController.framework */,
147 | );
148 | name = Products;
149 | sourceTree = "";
150 | };
151 | 928771821D8FDAF400491C20 /* PFWebViewController */ = {
152 | isa = PBXGroup;
153 | children = (
154 | 928771861D8FDAF400491C20 /* AppDelegate.h */,
155 | 928771871D8FDAF400491C20 /* AppDelegate.m */,
156 | 928771891D8FDAF400491C20 /* ViewController.h */,
157 | 9287718A1D8FDAF400491C20 /* ViewController.m */,
158 | 9287718C1D8FDAF400491C20 /* Main.storyboard */,
159 | 9287718F1D8FDAF400491C20 /* Assets.xcassets */,
160 | 928771911D8FDAF400491C20 /* LaunchScreen.storyboard */,
161 | 928771941D8FDAF400491C20 /* Info.plist */,
162 | 928771831D8FDAF400491C20 /* Supporting Files */,
163 | );
164 | path = PFWebViewController;
165 | sourceTree = "";
166 | };
167 | 928771831D8FDAF400491C20 /* Supporting Files */ = {
168 | isa = PBXGroup;
169 | children = (
170 | 928771841D8FDAF400491C20 /* main.m */,
171 | );
172 | name = "Supporting Files";
173 | sourceTree = "";
174 | };
175 | /* End PBXGroup section */
176 |
177 | /* Begin PBXHeadersBuildPhase section */
178 | 921A45C01D95870E0040BE3B /* Headers */ = {
179 | isa = PBXHeadersBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 921A45D01D9587300040BE3B /* PFWebViewController.h in Headers */,
183 | 921A45D11D9587440040BE3B /* PFWebViewNavigationHeader.h in Headers */,
184 | 921A45D21D9587440040BE3B /* PFWebViewToolBar.h in Headers */,
185 | );
186 | runOnlyForDeploymentPostprocessing = 0;
187 | };
188 | /* End PBXHeadersBuildPhase section */
189 |
190 | /* Begin PBXNativeTarget section */
191 | 921A45C21D95870E0040BE3B /* PFWebViewControllerFramework */ = {
192 | isa = PBXNativeTarget;
193 | buildConfigurationList = 921A45CE1D95870E0040BE3B /* Build configuration list for PBXNativeTarget "PFWebViewControllerFramework" */;
194 | buildPhases = (
195 | 921A45BE1D95870E0040BE3B /* Sources */,
196 | 921A45BF1D95870E0040BE3B /* Frameworks */,
197 | 921A45C01D95870E0040BE3B /* Headers */,
198 | 921A45C11D95870E0040BE3B /* Resources */,
199 | );
200 | buildRules = (
201 | );
202 | dependencies = (
203 | );
204 | name = PFWebViewControllerFramework;
205 | productName = PFWebViewControllerFramework;
206 | productReference = 921A45C31D95870E0040BE3B /* PFWebViewController.framework */;
207 | productType = "com.apple.product-type.framework";
208 | };
209 | 9287717F1D8FDAF400491C20 /* PFWebViewController */ = {
210 | isa = PBXNativeTarget;
211 | buildConfigurationList = 928771971D8FDAF400491C20 /* Build configuration list for PBXNativeTarget "PFWebViewController" */;
212 | buildPhases = (
213 | 9287717C1D8FDAF400491C20 /* Sources */,
214 | 9287717D1D8FDAF400491C20 /* Frameworks */,
215 | 9287717E1D8FDAF400491C20 /* Resources */,
216 | 921A45CF1D95870E0040BE3B /* Embed Frameworks */,
217 | );
218 | buildRules = (
219 | );
220 | dependencies = (
221 | 921A45C91D95870E0040BE3B /* PBXTargetDependency */,
222 | );
223 | name = PFWebViewController;
224 | productName = PFWebViewController;
225 | productReference = 928771801D8FDAF400491C20 /* PFWebViewController.app */;
226 | productType = "com.apple.product-type.application";
227 | };
228 | /* End PBXNativeTarget section */
229 |
230 | /* Begin PBXProject section */
231 | 928771781D8FDAF400491C20 /* Project object */ = {
232 | isa = PBXProject;
233 | attributes = {
234 | KnownAssetTags = (
235 | PFNavigationController,
236 | );
237 | LastUpgradeCheck = 0800;
238 | ORGANIZATIONNAME = Cee;
239 | TargetAttributes = {
240 | 921A45C21D95870E0040BE3B = {
241 | CreatedOnToolsVersion = 8.0;
242 | ProvisioningStyle = Automatic;
243 | };
244 | 9287717F1D8FDAF400491C20 = {
245 | CreatedOnToolsVersion = 8.0;
246 | DevelopmentTeam = Q8H99663FH;
247 | ProvisioningStyle = Automatic;
248 | };
249 | };
250 | };
251 | buildConfigurationList = 9287717B1D8FDAF400491C20 /* Build configuration list for PBXProject "PFWebViewController" */;
252 | compatibilityVersion = "Xcode 3.2";
253 | developmentRegion = English;
254 | hasScannedForEncodings = 0;
255 | knownRegions = (
256 | en,
257 | Base,
258 | );
259 | mainGroup = 928771771D8FDAF400491C20;
260 | productRefGroup = 928771811D8FDAF400491C20 /* Products */;
261 | projectDirPath = "";
262 | projectRoot = "";
263 | targets = (
264 | 9287717F1D8FDAF400491C20 /* PFWebViewController */,
265 | 921A45C21D95870E0040BE3B /* PFWebViewControllerFramework */,
266 | );
267 | };
268 | /* End PBXProject section */
269 |
270 | /* Begin PBXResourcesBuildPhase section */
271 | 921A45C11D95870E0040BE3B /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 921A45D61D9587600040BE3B /* PFWebViewController.bundle in Resources */,
276 | );
277 | runOnlyForDeploymentPostprocessing = 0;
278 | };
279 | 9287717E1D8FDAF400491C20 /* Resources */ = {
280 | isa = PBXResourcesBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | 928771931D8FDAF400491C20 /* LaunchScreen.storyboard in Resources */,
284 | 927D6EAC1D9127420066D7BC /* PFWebViewController.bundle in Resources */,
285 | 928771901D8FDAF400491C20 /* Assets.xcassets in Resources */,
286 | 9287718E1D8FDAF400491C20 /* Main.storyboard in Resources */,
287 | );
288 | runOnlyForDeploymentPostprocessing = 0;
289 | };
290 | /* End PBXResourcesBuildPhase section */
291 |
292 | /* Begin PBXSourcesBuildPhase section */
293 | 921A45BE1D95870E0040BE3B /* Sources */ = {
294 | isa = PBXSourcesBuildPhase;
295 | buildActionMask = 2147483647;
296 | files = (
297 | 921A45D31D95875A0040BE3B /* PFWebViewController.m in Sources */,
298 | 921A45D41D95875A0040BE3B /* PFWebViewNavigationHeader.m in Sources */,
299 | 921A45D51D95875A0040BE3B /* PFWebViewToolBar.m in Sources */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | 9287717C1D8FDAF400491C20 /* Sources */ = {
304 | isa = PBXSourcesBuildPhase;
305 | buildActionMask = 2147483647;
306 | files = (
307 | 9287718B1D8FDAF400491C20 /* ViewController.m in Sources */,
308 | 928771881D8FDAF400491C20 /* AppDelegate.m in Sources */,
309 | 927D6EAE1D9127420066D7BC /* PFWebViewNavigationHeader.m in Sources */,
310 | 927D6EAF1D9127420066D7BC /* PFWebViewToolBar.m in Sources */,
311 | 928771851D8FDAF400491C20 /* main.m in Sources */,
312 | 927D6EAD1D9127420066D7BC /* PFWebViewController.m in Sources */,
313 | );
314 | runOnlyForDeploymentPostprocessing = 0;
315 | };
316 | /* End PBXSourcesBuildPhase section */
317 |
318 | /* Begin PBXTargetDependency section */
319 | 921A45C91D95870E0040BE3B /* PBXTargetDependency */ = {
320 | isa = PBXTargetDependency;
321 | target = 921A45C21D95870E0040BE3B /* PFWebViewControllerFramework */;
322 | targetProxy = 921A45C81D95870E0040BE3B /* PBXContainerItemProxy */;
323 | };
324 | /* End PBXTargetDependency section */
325 |
326 | /* Begin PBXVariantGroup section */
327 | 9287718C1D8FDAF400491C20 /* Main.storyboard */ = {
328 | isa = PBXVariantGroup;
329 | children = (
330 | 9287718D1D8FDAF400491C20 /* Base */,
331 | );
332 | name = Main.storyboard;
333 | sourceTree = "";
334 | };
335 | 928771911D8FDAF400491C20 /* LaunchScreen.storyboard */ = {
336 | isa = PBXVariantGroup;
337 | children = (
338 | 928771921D8FDAF400491C20 /* Base */,
339 | );
340 | name = LaunchScreen.storyboard;
341 | sourceTree = "";
342 | };
343 | /* End PBXVariantGroup section */
344 |
345 | /* Begin XCBuildConfiguration section */
346 | 921A45CC1D95870E0040BE3B /* Debug */ = {
347 | isa = XCBuildConfiguration;
348 | buildSettings = {
349 | CODE_SIGN_IDENTITY = "";
350 | CURRENT_PROJECT_VERSION = 1;
351 | DEFINES_MODULE = YES;
352 | DEVELOPMENT_TEAM = "";
353 | DYLIB_COMPATIBILITY_VERSION = 1;
354 | DYLIB_CURRENT_VERSION = 1;
355 | DYLIB_INSTALL_NAME_BASE = "@rpath";
356 | INFOPLIST_FILE = PFWebViewControllerFramework/Info.plist;
357 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
358 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
359 | OTHER_CFLAGS = "-fembed-bitcode";
360 | PRODUCT_BUNDLE_IDENTIFIER = io.Cee.PFWebViewControllerFramework;
361 | PRODUCT_MODULE_NAME = PFWebViewController;
362 | PRODUCT_NAME = PFWebViewController;
363 | SKIP_INSTALL = YES;
364 | VERSIONING_SYSTEM = "apple-generic";
365 | VERSION_INFO_PREFIX = "";
366 | };
367 | name = Debug;
368 | };
369 | 921A45CD1D95870E0040BE3B /* Release */ = {
370 | isa = XCBuildConfiguration;
371 | buildSettings = {
372 | CODE_SIGN_IDENTITY = "";
373 | CURRENT_PROJECT_VERSION = 1;
374 | DEFINES_MODULE = YES;
375 | DEVELOPMENT_TEAM = "";
376 | DYLIB_COMPATIBILITY_VERSION = 1;
377 | DYLIB_CURRENT_VERSION = 1;
378 | DYLIB_INSTALL_NAME_BASE = "@rpath";
379 | INFOPLIST_FILE = PFWebViewControllerFramework/Info.plist;
380 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
382 | OTHER_CFLAGS = "-fembed-bitcode";
383 | PRODUCT_BUNDLE_IDENTIFIER = io.Cee.PFWebViewControllerFramework;
384 | PRODUCT_MODULE_NAME = PFWebViewController;
385 | PRODUCT_NAME = PFWebViewController;
386 | SKIP_INSTALL = YES;
387 | VERSIONING_SYSTEM = "apple-generic";
388 | VERSION_INFO_PREFIX = "";
389 | };
390 | name = Release;
391 | };
392 | 928771951D8FDAF400491C20 /* Debug */ = {
393 | isa = XCBuildConfiguration;
394 | buildSettings = {
395 | ALWAYS_SEARCH_USER_PATHS = NO;
396 | CLANG_ANALYZER_NONNULL = YES;
397 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
398 | CLANG_CXX_LIBRARY = "libc++";
399 | CLANG_ENABLE_MODULES = YES;
400 | CLANG_ENABLE_OBJC_ARC = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_CONSTANT_CONVERSION = YES;
403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
404 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
405 | CLANG_WARN_EMPTY_BODY = YES;
406 | CLANG_WARN_ENUM_CONVERSION = YES;
407 | CLANG_WARN_INFINITE_RECURSION = YES;
408 | CLANG_WARN_INT_CONVERSION = YES;
409 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
410 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
411 | CLANG_WARN_UNREACHABLE_CODE = YES;
412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
414 | COPY_PHASE_STRIP = NO;
415 | DEBUG_INFORMATION_FORMAT = dwarf;
416 | ENABLE_STRICT_OBJC_MSGSEND = YES;
417 | ENABLE_TESTABILITY = YES;
418 | GCC_C_LANGUAGE_STANDARD = gnu99;
419 | GCC_DYNAMIC_NO_PIC = NO;
420 | GCC_NO_COMMON_BLOCKS = YES;
421 | GCC_OPTIMIZATION_LEVEL = 0;
422 | GCC_PREPROCESSOR_DEFINITIONS = (
423 | "DEBUG=1",
424 | "$(inherited)",
425 | );
426 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
427 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
428 | GCC_WARN_UNDECLARED_SELECTOR = YES;
429 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
430 | GCC_WARN_UNUSED_FUNCTION = YES;
431 | GCC_WARN_UNUSED_VARIABLE = YES;
432 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
433 | MTL_ENABLE_DEBUG_INFO = YES;
434 | ONLY_ACTIVE_ARCH = YES;
435 | SDKROOT = iphoneos;
436 | TARGETED_DEVICE_FAMILY = "1,2";
437 | };
438 | name = Debug;
439 | };
440 | 928771961D8FDAF400491C20 /* Release */ = {
441 | isa = XCBuildConfiguration;
442 | buildSettings = {
443 | ALWAYS_SEARCH_USER_PATHS = NO;
444 | CLANG_ANALYZER_NONNULL = YES;
445 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
446 | CLANG_CXX_LIBRARY = "libc++";
447 | CLANG_ENABLE_MODULES = YES;
448 | CLANG_ENABLE_OBJC_ARC = YES;
449 | CLANG_WARN_BOOL_CONVERSION = YES;
450 | CLANG_WARN_CONSTANT_CONVERSION = YES;
451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
452 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
453 | CLANG_WARN_EMPTY_BODY = YES;
454 | CLANG_WARN_ENUM_CONVERSION = YES;
455 | CLANG_WARN_INFINITE_RECURSION = YES;
456 | CLANG_WARN_INT_CONVERSION = YES;
457 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
458 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
459 | CLANG_WARN_UNREACHABLE_CODE = YES;
460 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
461 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
462 | COPY_PHASE_STRIP = NO;
463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
464 | ENABLE_NS_ASSERTIONS = NO;
465 | ENABLE_STRICT_OBJC_MSGSEND = YES;
466 | GCC_C_LANGUAGE_STANDARD = gnu99;
467 | GCC_NO_COMMON_BLOCKS = YES;
468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
470 | GCC_WARN_UNDECLARED_SELECTOR = YES;
471 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
472 | GCC_WARN_UNUSED_FUNCTION = YES;
473 | GCC_WARN_UNUSED_VARIABLE = YES;
474 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
475 | MTL_ENABLE_DEBUG_INFO = NO;
476 | SDKROOT = iphoneos;
477 | TARGETED_DEVICE_FAMILY = "1,2";
478 | VALIDATE_PRODUCT = YES;
479 | };
480 | name = Release;
481 | };
482 | 928771981D8FDAF400491C20 /* Debug */ = {
483 | isa = XCBuildConfiguration;
484 | buildSettings = {
485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486 | DEVELOPMENT_TEAM = Q8H99663FH;
487 | INFOPLIST_FILE = PFWebViewController/Info.plist;
488 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
490 | PRODUCT_BUNDLE_IDENTIFIER = io.Cee.PFWebViewController;
491 | PRODUCT_NAME = "$(TARGET_NAME)";
492 | VALID_ARCHS = "arm64 armv7 armv7s";
493 | };
494 | name = Debug;
495 | };
496 | 928771991D8FDAF400491C20 /* Release */ = {
497 | isa = XCBuildConfiguration;
498 | buildSettings = {
499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500 | DEVELOPMENT_TEAM = Q8H99663FH;
501 | INFOPLIST_FILE = PFWebViewController/Info.plist;
502 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
504 | PRODUCT_BUNDLE_IDENTIFIER = io.Cee.PFWebViewController;
505 | PRODUCT_NAME = "$(TARGET_NAME)";
506 | VALID_ARCHS = "arm64 armv7 armv7s";
507 | };
508 | name = Release;
509 | };
510 | /* End XCBuildConfiguration section */
511 |
512 | /* Begin XCConfigurationList section */
513 | 921A45CE1D95870E0040BE3B /* Build configuration list for PBXNativeTarget "PFWebViewControllerFramework" */ = {
514 | isa = XCConfigurationList;
515 | buildConfigurations = (
516 | 921A45CC1D95870E0040BE3B /* Debug */,
517 | 921A45CD1D95870E0040BE3B /* Release */,
518 | );
519 | defaultConfigurationIsVisible = 0;
520 | defaultConfigurationName = Release;
521 | };
522 | 9287717B1D8FDAF400491C20 /* Build configuration list for PBXProject "PFWebViewController" */ = {
523 | isa = XCConfigurationList;
524 | buildConfigurations = (
525 | 928771951D8FDAF400491C20 /* Debug */,
526 | 928771961D8FDAF400491C20 /* Release */,
527 | );
528 | defaultConfigurationIsVisible = 0;
529 | defaultConfigurationName = Release;
530 | };
531 | 928771971D8FDAF400491C20 /* Build configuration list for PBXNativeTarget "PFWebViewController" */ = {
532 | isa = XCConfigurationList;
533 | buildConfigurations = (
534 | 928771981D8FDAF400491C20 /* Debug */,
535 | 928771991D8FDAF400491C20 /* Release */,
536 | );
537 | defaultConfigurationIsVisible = 0;
538 | defaultConfigurationName = Release;
539 | };
540 | /* End XCConfigurationList section */
541 | };
542 | rootObject = 928771781D8FDAF400491C20 /* Project object */;
543 | }
544 |
--------------------------------------------------------------------------------
/PFWebViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PFWebViewController.xcodeproj/xcshareddata/xcschemes/PFWebViewControllerFramework.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
70 |
71 |
72 |
73 |
75 |
76 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/PFWebViewController/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PFWebViewController/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/PFWebViewController/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/PFWebViewController/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/PFWebViewController/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PFWebViewController/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/PFWebViewController/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSAppTransportSecurity
6 |
7 | NSAllowsArbitraryLoads
8 |
9 |
10 | CFBundleDevelopmentRegion
11 | en
12 | CFBundleExecutable
13 | $(EXECUTABLE_NAME)
14 | CFBundleIdentifier
15 | $(PRODUCT_BUNDLE_IDENTIFIER)
16 | CFBundleInfoDictionaryVersion
17 | 6.0
18 | CFBundleName
19 | $(PRODUCT_NAME)
20 | CFBundlePackageType
21 | APPL
22 | CFBundleShortVersionString
23 | 1.0
24 | CFBundleVersion
25 | 1
26 | LSRequiresIPhoneOS
27 |
28 | UILaunchStoryboardName
29 | LaunchScreen
30 | UIMainStoryboardFile
31 | Main
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/PFWebViewController/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/PFWebViewController/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "PFWebViewController/PFWebViewController.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | }
22 |
23 |
24 | - (void)didReceiveMemoryWarning {
25 | [super didReceiveMemoryWarning];
26 | // Dispose of any resources that can be recreated.
27 | }
28 |
29 | - (IBAction)btnPressed:(UIButton *)sender {
30 | PFWebViewController *webVC = [[PFWebViewController alloc] initWithURLString:@"http://3g.qq.com"];
31 | [webVC setProgressBarColor:[UIColor redColor]]; // Default is black
32 |
33 | [self presentViewController:webVC animated:YES completion:nil];
34 | // [self.navigationController pushViewController:webVC animated:YES];
35 | }
36 |
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/PFWebViewController/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // PFWebViewController
4 | //
5 | // Created by Cee on 9/19/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/PFWebViewControllerFramework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/PFWebViewControllerFramework/PFWebViewControllerFramework.h:
--------------------------------------------------------------------------------
1 | //
2 | // PFWebViewControllerFramework.h
3 | // PFWebViewControllerFramework
4 | //
5 | // Created by Cee on 9/23/16.
6 | // Copyright © 2016 Cee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for PFWebViewControllerFramework.
12 | FOUNDATION_EXPORT double PFWebViewControllerFrameworkVersionNumber;
13 |
14 | //! Project version string for PFWebViewControllerFramework.
15 | FOUNDATION_EXPORT const unsigned char PFWebViewControllerFrameworkVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PFWebViewController
2 |
3 | [](http://cocoapods.org/pods/PFWebViewController)
4 | [](http://cocoapods.org/pods/PFWebViewController)
5 | [](http://cocoapods.org/pods/PFWebViewController)
6 | [](http://cocoapods.org/pods/PFWebViewController)
7 |
8 | ## Features
9 |
10 | - A light-weight webview controller using WKWebView. Only supports iOS 9 and above.
11 |
12 | - Easy use and less memory consuming than [RxWebViewController](https://github.com/Roxasora/RxWebViewController).
13 |
14 | - Support Safari-like reader mode.
15 |
16 | ## Screenshots
17 |
18 | ### Loading
19 |
20 |
21 |
22 | ### Main Screen
23 |
24 |
25 |
26 |
27 | ### Reader Mode
28 |
29 |
30 |
31 |
32 | ## Installation
33 |
34 | ### Using Carthage
35 |
36 | Add `PFWebViewController` to your `Cartfile`:
37 |
38 | ```
39 | github "PerfectFreeze/PFWebViewController"
40 | ```
41 |
42 | Run `carthage` to build this framework.
43 |
44 | Add `PFWebViewController.framework` to your Xcode project.
45 |
46 | ### Using CocoaPods
47 |
48 | Add `PFWebViewController` to your `Podfile`:
49 |
50 | ```ruby
51 | pod 'PFWebViewController', '~> 1.1.1'
52 | ```
53 |
54 | Run `pod install` to install this framework.
55 |
56 | ### Manually
57 |
58 | Drag `Classes` folder to your project.
59 |
60 | ## Usage
61 |
62 | ```objective-c
63 | // Init with a string
64 | PFWebViewController *webVC = [[PFWebViewController alloc] initWithURLString:@"https://github.com"];
65 |
66 | // Or with an URL
67 | NSURL *url = ...;
68 | PFWebViewController *webVC = [[PFWebViewController alloc] initWithURL:url];
69 |
70 | // Optional: Set Progressbar's Color, default is black
71 | [webVC setProgressBarColor:[UIColor redColor]];
72 |
73 | // Present in a single view
74 | [self presentViewController:webVC animated:YES completion:nil];
75 |
76 | // Or push in a navigationController
77 | [self.navigationController pushViewController:webVC animated:YES];
78 | ```
79 | ## Further Reading
80 |
81 | - [How to implement Safari-like reader mode in PFWebViewController](http://sergiochan.xyz/2016/10/21/%E5%A6%82%E4%BD%95%E5%9C%A8-WKWebView-%E4%B8%AD%E5%AE%9E%E7%8E%B0-Safari-%E5%8E%9F%E7%94%9F%E7%9A%84%E9%98%85%E8%AF%BB%E6%A8%A1%E5%BC%8F/)
82 |
83 | ## License
84 |
85 | This project is released under the terms and conditions of the [MIT license](https://opensource.org/licenses/MIT). See [LICENSE](LICENSE) for details.
86 |
--------------------------------------------------------------------------------
/Screenshots/GitHub_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PerfectFreeze/PFWebViewController/fbbb2416ef3a402a59b77ae863e223a977766cd5/Screenshots/GitHub_1.png
--------------------------------------------------------------------------------
/Screenshots/GitHub_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PerfectFreeze/PFWebViewController/fbbb2416ef3a402a59b77ae863e223a977766cd5/Screenshots/GitHub_2.png
--------------------------------------------------------------------------------
/Screenshots/Loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PerfectFreeze/PFWebViewController/fbbb2416ef3a402a59b77ae863e223a977766cd5/Screenshots/Loading.png
--------------------------------------------------------------------------------
/Screenshots/Reader_Mode_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PerfectFreeze/PFWebViewController/fbbb2416ef3a402a59b77ae863e223a977766cd5/Screenshots/Reader_Mode_1.png
--------------------------------------------------------------------------------
/Screenshots/Reader_Mode_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PerfectFreeze/PFWebViewController/fbbb2416ef3a402a59b77ae863e223a977766cd5/Screenshots/Reader_Mode_2.png
--------------------------------------------------------------------------------