XCUIDevice+FBRotation.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <XCTest/XCTest.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. #if !TARGET_OS_TV
  12. @interface XCUIDevice (FBRotation)
  13. /**
  14. Sets requested device interface orientation.
  15. @param orientation The interface orientation.
  16. @return YES if the operation succeeds, otherwise NO.
  17. */
  18. - (BOOL)fb_setDeviceInterfaceOrientation:(UIDeviceOrientation)orientation;
  19. /**
  20. Sets the devices orientation to the rotation passed.
  21. @param rotationObj The rotation defining the devices orientation.
  22. @return YES if the operation succeeds, otherwise NO.
  23. */
  24. - (BOOL)fb_setDeviceRotation:(NSDictionary *)rotationObj;
  25. /*! The UIDeviceOrientation to rotation mappings */
  26. @property (strong, nonatomic, readonly) NSDictionary *fb_rotationMapping;
  27. @end
  28. #endif
  29. NS_ASSUME_NONNULL_END