File tree Expand file tree Collapse file tree
Pod/Classes/M2DWebViewController Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,24 +106,22 @@ - (void)viewDidLoad
106106 [super viewDidLoad ];
107107 self.title = NSLocalizedString(@" Loading..." , @" " );
108108
109- # if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_8_0
110- type_ = M2DWebViewTypeUIKit;
111- # endif
109+ if ( floor ( NSFoundationVersionNumber ) <= NSFoundationVersionNumber_iOS_7_1) {
110+ type_ = M2DWebViewTypeUIKit;
111+ }
112112
113113 if (type_ == M2DWebViewTypeUIKit) {
114114 webView_ = [[UIWebView alloc ] initWithFrame: self .view.bounds];
115115 [(UIWebView *)webView_ setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
116116 ((UIWebView *)webView_).delegate = self;
117117 [(UIWebView *)webView_ loadRequest: [NSURLRequest requestWithURL: url_]];
118118 }
119- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0
120119 else if (type_ == M2DWebViewTypeWebKit || type_ == M2DWebViewTypeAutoSelect) {
121120 webView_ = [[WKWebView alloc ] initWithFrame: self .view.bounds];
122121 [(WKWebView *)webView_ setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
123122 ((WKWebView *)webView_).navigationDelegate = self;
124123 [(WKWebView *)webView_ loadRequest: [NSURLRequest requestWithURL: url_]];
125124 }
126- #endif
127125
128126 [self .view addSubview: webView_];
129127 [[UIApplication sharedApplication ] setStatusBarHidden: NO withAnimation: UIStatusBarAnimationSlide];
You can’t perform that action at this time.
0 commit comments