#import "ViewController.h"
#import <WebKit/WebKit.h>
@interface ViewController ()
/// web
@property (nonatomic, strong) WKWebView *webView;
/// view
@property (nonatomic, strong) UIView *bottomView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self creatWebView];
}
- (UIView *)bottomView {
if (!_bottomView) {
_bottomView = [[UIView alloc] init];
_bottomView.backgroundColor = [UIColor yellowColor];
}
return _bottomView;
}
// MARK: - 注释
- (void)creatWebView {
WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) configuration:config];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.apple.com"]];
[_webView loadRequest:request];
[self.view
02-09
906
09-08
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交