MyQLPreviewController.m 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // MyQLPreviewController.m
  3. // Apex Mobile
  4. //
  5. // Created by Ray on 02/03/2018.
  6. // Copyright © 2018 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "MyQLPreviewController.h"
  9. @interface MyQLPreviewController ()
  10. @end
  11. @implementation MyQLPreviewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // self.toolbarItems = nil;
  15. // for(UIView* v in self.view.subviews)
  16. // {
  17. // if ([v isKindOfClass:[UIToolbar class] ]) {
  18. // v.hidden = YES;
  19. // }
  20. // }
  21. // Do any additional setup after loading the view.
  22. }
  23. -(void)viewWillLayoutSubviews
  24. {
  25. [super viewWillLayoutSubviews];
  26. // self.navigationController.navigationBar.hidden = YES;
  27. // self.navigationController.toolbar.hidden = YES;
  28. // [self.navigationController.toolbar removeFromSuperview];
  29. // UIView* v1 = self.navigationController.toolbar.superview;
  30. // UIView* v2 = self.navigationController.toolbar;
  31. [self.navigationController setToolbarHidden:true];
  32. // self.navigationController.toolbar.backgroundColor = [UIColor clearColor];
  33. //把tool bar frame置为空,实现隐藏
  34. self.navigationController.toolbar.frame = CGRectMake(0, 0, 0, 0);
  35. // [self.navigationController.toolbar.superview removeFromSuperview];
  36. // // custom view demonstrate
  37. // UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
  38. // topView.backgroundColor = [UIColor redColor];
  39. //
  40. // [self.view addSubview:topView];
  41. }
  42. - (void)didReceiveMemoryWarning {
  43. [super didReceiveMemoryWarning];
  44. // Dispose of any resources that can be recreated.
  45. }
  46. /*
  47. #pragma mark - Navigation
  48. // In a storyboard-based application, you will often want to do a little preparation before navigation
  49. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  50. // Get the new view controller using [segue destinationViewController].
  51. // Pass the selected object to the new view controller.
  52. }
  53. */
  54. @end