12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // shoujianrenResultView.m
- // smartRhino
- //
- // Created by taidi on 2020/1/13.
- // Copyright © 2020 tederen. All rights reserved.
- //
- #import "shoujianrenResultView.h"
- #import "shoujianrenResultViewCell.h"
- @interface shoujianrenResultView ()<
- UITableViewDelegate,
- UITableViewDataSource
- >
- @property (nonatomic,strong)UITableView *tableView;
- @end
- @implementation shoujianrenResultView
- - (instancetype)init {
- if ([super init]) {
- [self setupUI];
- }
- return self;
- }
- - (void)setupUI {
- [self addSubview:self.tableView];
- [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.equalTo(self);
- }];
- }
- - (UITableView *)tableView {
- if (!_tableView) {
- _tableView = [[UITableView alloc] init];
- _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
- _tableView.delegate = self;
- _tableView.dataSource = self;
- _tableView.tableFooterView = [UIView new];
- [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
- [_tableView registerNib:[UINib nibWithNibName:@"shoujianrenResultViewCell" bundle:nil] forCellReuseIdentifier:@"shoujianrenResultViewCell"];
- }
- return _tableView;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 10;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- shoujianrenResultViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"shoujianrenResultViewCell" forIndexPath:indexPath];
- [cell bindData:@"" WithKeyWord:@""];
- return cell;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 60;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- SelectModel *model = self.modelArr[indexPath.row];
- // 通知外面更新数据
- [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFI_ChaoSongRen object:nil userInfo:@{@"selectPeople":@[model]}];
- }
- @end
|