10
10
11
11
@interface InReadWKWebview ()
12
12
13
- @property (strong , nonatomic ) WKWebView *wkWwebView ;
13
+ @property (strong , nonatomic ) WKWebView *wkWebView ;
14
14
15
15
@property (strong , nonatomic ) TeadsAd *teadsInRead;
16
16
@@ -22,14 +22,14 @@ - (void)viewDidLoad {
22
22
[super viewDidLoad ];
23
23
24
24
WKWebViewConfiguration *theConfiguration = [[WKWebViewConfiguration alloc ] init ];
25
- self.wkWwebView = [[WKWebView alloc ] initWithFrame: CGRectZero configuration: theConfiguration];
26
- self.wkWwebView .navigationDelegate = self;
25
+ self.wkWebView = [[WKWebView alloc ] initWithFrame: CGRectZero configuration: theConfiguration];
26
+ self.wkWebView .navigationDelegate = self;
27
27
28
- [self .view addSubview: self .wkWwebView ];
28
+ [self .view addSubview: self .wkWebView ];
29
29
30
- [self .wkWwebView setTranslatesAutoresizingMaskIntoConstraints: NO ];
31
- [self .view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|[_wkWwebView]|" options: 0 metrics: nil views: NSDictionaryOfVariableBindings(_wkWwebView )]];
32
- [self .view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|[_wkWwebView]|" options: 0 metrics: nil views: NSDictionaryOfVariableBindings(_wkWwebView )]];
30
+ [self .wkWebView setTranslatesAutoresizingMaskIntoConstraints: NO ];
31
+ [self .view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|[_wkWwebView]|" options: 0 metrics: nil views: NSDictionaryOfVariableBindings(_wkWebView )]];
32
+ [self .view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|[_wkWwebView]|" options: 0 metrics: nil views: NSDictionaryOfVariableBindings(_wkWebView )]];
33
33
34
34
self.navigationItem .title = @" inRead WKWebView" ;
35
35
@@ -43,18 +43,18 @@ - (void)viewDidLoad {
43
43
// Here we specify in placeholderText an id for a HTML node to insert the inRead
44
44
self.teadsInRead = [[TeadsAd alloc ] initInReadWithPlacementId: pid
45
45
placeholderText: @" #my-placement-id"
46
- wkWebView: self .wkWwebView
46
+ wkWebView: self .wkWebView
47
47
delegate: self ];
48
48
webSiteURL = [NSURL fileURLWithPath: [[NSBundle mainBundle ] pathForResource: @" index" ofType: @" html" ] isDirectory: NO ];
49
49
} else {
50
50
// inRead
51
51
self.teadsInRead = [[TeadsAd alloc ] initInReadWithPlacementId: pid
52
52
placeholderText: [[NSUserDefaults standardUserDefaults ] stringForKey: @" placeholderText" ]
53
- wkWebView: self .wkWwebView
53
+ wkWebView: self .wkWebView
54
54
delegate: self ];
55
55
webSiteURL = [NSURL URLWithString: urlToLoad];
56
56
}
57
- [self .wkWwebView loadRequest: [NSURLRequest requestWithURL: webSiteURL]];
57
+ [self .wkWebView loadRequest: [NSURLRequest requestWithURL: webSiteURL]];
58
58
59
59
}
60
60
0 commit comments