ZZSOViewController.m 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // ZZSOViewController.m
  3. // ZZUIKit_Example
  4. //
  5. // Created by Max on 2021/1/15.
  6. // Copyright © 2021 bymiracles@163.com. All rights reserved.
  7. //
  8. #import "ZZSOViewController.h"
  9. #import <ZZUIKit/ZZSOView.h>
  10. #import <ZZUIKit/ZZUIKitEx.h>
  11. #import <ZZUIKit/ZZUIKitConst.h>
  12. #import "ZZSOTableViewController1.h"
  13. #import <ZZUIKit/ZZMaskViewController.h>
  14. #import "ZZDoubleVC.h"
  15. @interface ZZSOViewController ()<ZZSOContentDelegate>
  16. @property(nonatomic,strong) ZZSOView *soView;
  17. @property(nonatomic,strong) NSArray *itemArr;
  18. @end
  19. @implementation ZZSOViewController
  20. - (void)viewDidLoad {
  21. [super viewDidLoad];
  22. // Do any additional setup after loading the view.
  23. [self.view addSubview:self.soView];
  24. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  25. _itemArr = @[
  26. @{
  27. ZZTitleKey:@"综合1",
  28. ZZImgKey:[UIImage imageNamed:@"ic_tab_home_active"],
  29. ZZTitleColorKey:[UIColor redColor],
  30. ZZRotateKey:@"r"
  31. },
  32. @{
  33. ZZTitleKey:@"综合",
  34. ZZImgKey:[UIImage imageNamed:@"编组备份 3-1"],
  35. ZZImgSelectKey:[UIImage imageNamed:@"编组备份 3"],
  36. ZZTitleColorKey:[UIColor redColor],
  37. },
  38. @{
  39. ZZTitleKey:@"接诊量",
  40. ZZImgKey:[UIImage imageNamed:@"ic_launcher"],
  41. ZZTitleColorKey:[UIColor redColor],
  42. }
  43. ];
  44. [self.soView reloadData];
  45. });
  46. }
  47. #pragma mark -- delegate
  48. -(NSInteger)numberOfZZSoItem{
  49. return _itemArr.count;
  50. }
  51. -(NSDictionary *)ZZSoView:(ZZSOView *)soView itemForIndex:(NSInteger)index{
  52. return _itemArr[index];
  53. }
  54. -(UIViewController *)ZZSoView:(ZZSOView *)soView controllerAtIndex:(NSInteger)index{
  55. if (index == 0){
  56. return [ZZSOTableViewController1 new];
  57. }else if (index == 2){
  58. return [ZZDoubleVC new];
  59. }
  60. return nil;
  61. }
  62. -(CGRect)ZZSoView:(ZZSOView *)soView rectForControllerAtIndex:(NSInteger)index{
  63. return CGRectMake(0 , NAV_STATUS_BAR_H() + soView.zz_height, SCREEN_W(), 300);
  64. }
  65. -(ZZSOView *)soView{
  66. if(!_soView){
  67. _soView = [[ZZSOView alloc] initWithFrame:CGRectMake(0, NAV_STATUS_BAR_H(), self.view.zz_width, 104)];
  68. _soView.delegate = self;
  69. _soView.maskVC = [[ZZMaskViewController alloc] initWithMaskColor:zz_RGBAHex(0xff0000, 0.5) alpha:0.85];
  70. }
  71. return _soView;
  72. }
  73. //-(NSTimeInterval)ZZSoView:(ZZSOView *)soView timeForControllerAnimaAtIndex:(NSInteger)index{
  74. // return 2;
  75. //}
  76. @end