Nenhuma descrição

RNCUIWebView.h 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #import <React/RCTView.h>
  2. @class RNCUIWebView;
  3. /**
  4. * Special scheme used to pass messages to the injectedJavaScript
  5. * code without triggering a page load. Usage:
  6. *
  7. * window.location.href = RNCJSNavigationScheme + '://hello'
  8. */
  9. extern NSString *const RNCJSNavigationScheme;
  10. @protocol RNCUIWebViewDelegate <NSObject>
  11. - (BOOL)webView:(RNCUIWebView *)webView
  12. shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
  13. withCallback:(RCTDirectEventBlock)callback;
  14. @end
  15. @interface RNCUIWebView : RCTView
  16. @property (nonatomic, weak) id<RNCUIWebViewDelegate> delegate;
  17. @property (nonatomic, copy) NSDictionary *source;
  18. @property (nonatomic, assign) UIEdgeInsets contentInset;
  19. @property (nonatomic, assign) BOOL automaticallyAdjustContentInsets;
  20. @property (nonatomic, assign) BOOL messagingEnabled;
  21. @property (nonatomic, copy) NSString *injectedJavaScript;
  22. @property (nonatomic, assign) BOOL scalesPageToFit;
  23. - (void)goForward;
  24. - (void)goBack;
  25. - (void)reload;
  26. - (void)stopLoading;
  27. - (void)postMessage:(NSString *)message;
  28. - (void)injectJavaScript:(NSString *)script;
  29. @end