mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
1442c265da
Summary: @public `UIWebView` has been deprecated and replaced by `WKWebView`. This diff introduces a new component `WKWebView` that simply renders a `WKWebView` on iOS. This is the first in the stack of many diffs that'll be required to fully replace `UIWebView` with `WKWebView` in the `<WebView/>` React Native component. Eventually, I hope to introduce a prop called `useWebKitImplementation`, which, when true, will force RN to use `WKWebView` instead of `UIWebView` for the `<WebView/>` component. The only thing that's been implemented so far is the `source` property. Reviewed By: mmmulani Differential Revision: D6266100 fbshipit-source-id: 65862e34bd98db7fff0349cf26888afee43a56e4
19 lines
269 B
Objective-C
19 lines
269 B
Objective-C
#import "RCTViewManager.h"
|
|
#import "RCTWKWebView.h"
|
|
|
|
@interface RCTWKWebViewManager : RCTViewManager
|
|
@end
|
|
|
|
@implementation RCTWKWebViewManager
|
|
|
|
RCT_EXPORT_MODULE()
|
|
|
|
- (UIView *)view
|
|
{
|
|
return [RCTWKWebView new];
|
|
}
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(source, NSDictionary)
|
|
|
|
@end
|