RootNavigationController.m 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // RootNavigationController.m
  3. // RA Image
  4. //
  5. // Created by Jack on 2017/5/5.
  6. // Copyright © 2017年 USAI. All rights reserved.
  7. //
  8. #import "RootNavigationController.h"
  9. #import "PhotoPreviewController.h"
  10. #import "NewPhotoPreviewController.h"
  11. @interface RootNavigationController ()
  12. @end
  13. @implementation RootNavigationController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. self.view.backgroundColor = [UIColor whiteColor];
  18. }
  19. - (void)didReceiveMemoryWarning {
  20. [super didReceiveMemoryWarning];
  21. // Dispose of any resources that can be recreated.
  22. }
  23. - (BOOL)shouldAutorotate {
  24. if ([self.topViewController isKindOfClass:[PhotoPreviewController class]]) { // 图片预览保持竖屏
  25. return NO;
  26. }
  27. if ([self.topViewController isKindOfClass:[NewPhotoPreviewController class]]) { // 图片预览保持竖屏
  28. return NO;
  29. }
  30. return YES;
  31. }
  32. @end