RecyleViewController.m 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // RecyleViewController.m
  3. // WSCloudStorage
  4. //
  5. // Created by JonathanH on 2017/8/9.
  6. // Copyright © 2017年 wswinsoft. All rights reserved.
  7. //
  8. #import "RecyleViewController.h"
  9. #import "CSFileCell.h"
  10. @interface RecyleViewController ()
  11. @property (nonatomic,weak)UITableView *tableView;
  12. @end
  13. @implementation RecyleViewController
  14. -(void)dismisself{
  15. [self dismissViewControllerAnimated:YES completion:nil];
  16. }
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. self.title = @"回收站";
  20. //self.navigationController.navigationItem.leftBarButtonItem =
  21. UIBarButtonItem *leftback = [[UIBarButtonItem alloc]initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(dismisself)];
  22. self.navigationItem.leftBarButtonItem = leftback;
  23. self.navigationItem.leftItemsSupplementBackButton = YES;
  24. // Do any additional setup after loading the view.
  25. [self initSubView];
  26. }
  27. - (void)didReceiveMemoryWarning {
  28. [super didReceiveMemoryWarning];
  29. // Dispose of any resources that can be recreated.
  30. }
  31. - (void)initSubView{
  32. CGFloat screenH = SCREEN_HEIGHT;
  33. CGFloat screenW = SCREEN_WIDTH;
  34. UITableView *tableView = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
  35. [self.view addSubview:tableView];
  36. self.tableView = tableView;
  37. CALayer *layer = [CALayer layer];
  38. layer.frame = CGRectMake(0, screenH-44, screenW, 44);//44-30 = 14 7 7
  39. layer.backgroundColor = RGB(121, 121, 121).CGColor;
  40. UIButton *clearAllBtn = [UIButton buttonWithType:UIButtonTypeSystem];
  41. clearAllBtn.frame = CGRectMake(40, layer.frame.origin.y+7, screenW -80, 30);
  42. [clearAllBtn setTitle:@"一键清空" forState:UIControlStateNormal];
  43. clearAllBtn.backgroundColor = RGB(132,178,237);
  44. [self.view addSubview:clearAllBtn];
  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