// // QFTSearchContentView.m // HCQuanfangtong // // Created by qft_Ios_03 on 2018/6/6. // Copyright © 2018年 qft_Ios_03. All rights reserved. // #import "QFTSearchContentView.h" #import "QFTMoreSearchCell.h" @interface QFTSearchContentView() @property (nonatomic, strong) UITableView *table; @end @implementation QFTSearchContentView - (instancetype)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if(self){ self.alpha = 0.0f; _table = [[UITableView alloc] initWithFrame:self.bounds]; _table.separatorStyle = UITableViewCellSeparatorStyleNone; _table.delegate = self; _table.dataSource = self; [_table registerNib:[UINib nibWithNibName:NSStringFromClass([QFTMoreSearchCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([QFTMoreSearchCell class])]; [self addSubview:_table]; self.table = _table; } return self; } - (void)setDataSource:(NSArray *)dataSource{ _dataSource = dataSource; [self.table reloadData]; } #pragma mark - UITableViewDelegate,UITableViewDataSource //- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ // return self.dataSource.count; //} //- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ // QFTMoreSearchCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([QFTMoreSearchCell class])]; // QFTHome_titleMenuResponseModel *model = self.dataSource[indexPath.row]; // // // [cell.icon setImage:[UIImage imageNamed:model.icon]]; // cell.titleLbl.text = model.name; // // return cell; //} @end