ZZDoubleVC.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // ZZCustomDoubleViewController.m
  3. // ZZUIKit_Example
  4. //
  5. // Created by Max on 2021/1/14.
  6. // Copyright © 2021 bymiracles@163.com. All rights reserved.
  7. //
  8. #import "ZZDoubleVC.h"
  9. #import <ZZUIKit/ZZUIKitEx.h>
  10. @interface ZZDoubleVC ()<ZZDoubleViewControllerContainer,UITableViewDelegate,UITableViewDataSource>
  11. @end
  12. @implementation ZZDoubleVC
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. self.delegate = self;
  16. }
  17. -(CGRect)mainRect{
  18. return CGRectMake(0, 0, SCREEN_W()/4, SCREEN_H());;
  19. }
  20. -(CGRect)subRect{
  21. return CGRectMake(SCREEN_W()/4, 0, SCREEN_W()*3/4, SCREEN_H());
  22. }
  23. -(UIViewController *)mainController{
  24. UITableViewController *tabviewController = [[UITableViewController alloc] initWithStyle:UITableViewStylePlain];
  25. tabviewController.tableView.delegate = self;
  26. tabviewController.tableView.dataSource = self;
  27. return tabviewController;
  28. }
  29. -(UIViewController *)subController{
  30. UIViewController *vc = [UIViewController new];
  31. vc.view.backgroundColor = [UIColor redColor];
  32. return vc;
  33. }
  34. #pragma mark -- tableView
  35. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  36. return 10;
  37. }
  38. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  39. UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
  40. cell.textLabel.text = @"123123";
  41. return cell;
  42. }
  43. @end