This repository was archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathAFWebViewController.h
More file actions
115 lines (96 loc) · 3.12 KB
/
AFWebViewController.h
File metadata and controls
115 lines (96 loc) · 3.12 KB
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
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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//
// AFWebViewController.h
// AFWebViewController
//
// Created by Anders Eriksen on 09/11/14.
// Copyright (c) 2014-2015 Fogh Development. All rights reserved.
//
@import UIKit;
@class WKWebView;
@class WKWebViewConfiguration;
NS_ASSUME_NONNULL_BEGIN
@interface AFWebViewController : UIViewController
@property (nonatomic, strong, readonly) WKWebView *webView;
/**
* Instantiate WebViewController with URL address string.
*
* @param urlString String with URL to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
+ (instancetype)webViewControllerWithAddress:(NSString *)urlString;
/**
* Instantiate WebViewController with URL.
*
* @param URL URL with address to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
+ (instancetype)webViewControllerWithURL:(NSURL *)URL;
/**
* Instantiate WebViewController with URL request.
*
* @param request NSURLRequest to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
+ (instancetype)webViewControllerWithURLRequest:(NSURLRequest *)request;
/**
* Instantiate WebViewController with HTML string and base URL.
*
* @param HTMLString HTML string to show in web view.
* @param baseURL Base URL containing local files like stylesheets etc.
*
* @return Instance of `AFWebViewController`.
*/
+ (instancetype)webViewControllerWithHTMLString:(NSString *)HTMLString andBaseURL:(NSURL *)baseURL;
/**
* Instantiate WebViewController with URL address string.
*
* @param urlString String with URL to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
- (instancetype)initWithAddress:(NSString *)urlString;
/**
* Instantiate WebViewController with URL.
*
* @param URL URL with address to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
- (instancetype)initWithURL:(NSURL *)URL;
/**
* Instantiate WebViewController with URL request.
*
* @param request NSURLRequest to show in web view.
*
* @return Instance of `AFWebViewController`.
*/
- (instancetype)initWithURLRequest:(NSURLRequest *)request;
/**
* Instantiate WebViewController with URL request.
*
* @param request NSURLRequest to show in web view.
* @param configuration a collection of properties used to initialize a web view.
*
* @return Instance of `AFWebViewController`.
*/
- (instancetype)initWithURLRequest:(NSURLRequest *)request configuration:(nullable WKWebViewConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
/**
* Instantiate WebViewController with HTML string and base URL.
*
* @param HTMLString HTML string to show in web view.
* @param baseURL Base URL containing local files like stylesheets etc.
*
* @return Instance of `AFWebViewController`.
*/
- (instancetype)initWithHTMLString:(NSString *)HTMLString andBaseURL:(NSURL *)baseURL NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
/**
* Tint color for tool bar.
*/
@property (nonatomic, strong) UIColor *toolbarTintColor;
@end
NS_ASSUME_NONNULL_END