RCTUtilsUIOverride.m 626 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  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 "RCTUtilsUIOverride.h"
  8. @implementation RCTUtilsUIOverride
  9. static UIViewController *_presentedViewController = nil;
  10. + (void)setPresentedViewController:(UIViewController *)presentedViewController
  11. {
  12. _presentedViewController = presentedViewController;
  13. }
  14. + (UIViewController *)presentedViewController
  15. {
  16. return _presentedViewController;
  17. }
  18. + (BOOL)hasPresentedViewController
  19. {
  20. return _presentedViewController != nil;
  21. }
  22. @end