123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // AccompanyDetailViewController.m
- // KulexiuForTeacher
- //
- // Created by 王智 on 2022/4/6.
- //
- #import "AccompanyDetailViewController.h"
- #import "AccompanyNavView.h"
- @interface AccompanyDetailViewController ()<UITableViewDelegate,UITableViewDataSource>
- @property (nonatomic, strong) AccompanyNavView *navView;
- @property (nonatomic, strong) UITableView *tableView;
- @end
- @implementation AccompanyDetailViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- self.ks_prefersNavigationBarHidden = YES;
- [self configUI];
- }
- - (void)configUI {
- [self.scrollView removeFromSuperview];
- [self.view addSubview:self.navView];
- CGFloat height = [self.navView getViewHeight];
- [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.right.top.mas_equalTo(self);
- make.height.mas_equalTo(height);
- }];
-
- }
- #pragma mark --- lazying
- - (UITableView *)tableView {
- if (!_tableView) {
- _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
- _tableView.delegate = self;
- _tableView.dataSource = self;
- _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- _tableView.showsVerticalScrollIndicator = NO;
- _tableView.backgroundColor = [UIColor clearColor];
- _tableView.rowHeight = UITableViewAutomaticDimension;
- _tableView.estimatedRowHeight = 136.0f;
- UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
- bottomView.backgroundColor = [UIColor clearColor];
- _tableView.tableFooterView = bottomView;
- }
- return _tableView;
- }
- - (AccompanyNavView *)navView {
- if (!_navView) {
- _navView = [AccompanyNavView shareInstance];
- MJWeakSelf;
- [_navView navCallback:^{
- [weakSelf backAction];
- }];
- }
- return _navView;
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|