Нема описа

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/RCTView.h>
  8. #import <React/RCTDefines.h>
  9. #import <WebKit/WebKit.h>
  10. @class RNCWKWebView;
  11. @protocol RNCWKWebViewDelegate <NSObject>
  12. - (BOOL)webView:(RNCWKWebView *)webView
  13. shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
  14. withCallback:(RCTDirectEventBlock)callback;
  15. @end
  16. @interface RNCWKWebView : RCTView
  17. @property (nonatomic, weak) id<RNCWKWebViewDelegate> delegate;
  18. @property (nonatomic, copy) NSDictionary *source;
  19. @property (nonatomic, assign) BOOL messagingEnabled;
  20. @property (nonatomic, copy) NSString *injectedJavaScript;
  21. @property (nonatomic, assign) BOOL scrollEnabled;
  22. @property (nonatomic, assign) BOOL pagingEnabled;
  23. @property (nonatomic, assign) CGFloat decelerationRate;
  24. @property (nonatomic, assign) BOOL allowsInlineMediaPlayback;
  25. @property (nonatomic, assign) BOOL bounces;
  26. @property (nonatomic, assign) BOOL mediaPlaybackRequiresUserAction;
  27. #if WEBKIT_IOS_10_APIS_AVAILABLE
  28. @property (nonatomic, assign) WKDataDetectorTypes dataDetectorTypes;
  29. #endif
  30. @property (nonatomic, assign) UIEdgeInsets contentInset;
  31. @property (nonatomic, assign) BOOL automaticallyAdjustContentInsets;
  32. @property (nonatomic, assign) BOOL hideKeyboardAccessoryView;
  33. @property (nonatomic, assign) BOOL allowsBackForwardNavigationGestures;
  34. @property (nonatomic, assign) BOOL incognito;
  35. @property (nonatomic, assign) BOOL useSharedProcessPool;
  36. @property (nonatomic, copy) NSString *userAgent;
  37. @property (nonatomic, assign) BOOL cacheEnabled;
  38. @property (nonatomic, assign) BOOL allowsLinkPreview;
  39. @property (nonatomic, assign) BOOL showsHorizontalScrollIndicator;
  40. @property (nonatomic, assign) BOOL showsVerticalScrollIndicator;
  41. + (void)setClientAuthenticationCredential:(nullable NSURLCredential*)credential;
  42. - (void)postMessage:(NSString *)message;
  43. - (void)injectJavaScript:(NSString *)script;
  44. - (void)goForward;
  45. - (void)goBack;
  46. - (void)reload;
  47. - (void)stopLoading;
  48. @end