QFTSearchContentView.m 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // QFTSearchContentView.m
  3. // HCQuanfangtong
  4. //
  5. // Created by qft_Ios_03 on 2018/6/6.
  6. // Copyright © 2018年 qft_Ios_03. All rights reserved.
  7. //
  8. #import "QFTSearchContentView.h"
  9. #import "QFTMoreSearchCell.h"
  10. @interface QFTSearchContentView()<UITableViewDelegate,UITableViewDataSource>
  11. @property (nonatomic, strong) UITableView *table;
  12. @end
  13. @implementation QFTSearchContentView
  14. - (instancetype)initWithFrame:(CGRect)frame{
  15. self = [super initWithFrame:frame];
  16. if(self){
  17. self.alpha = 0.0f;
  18. _table = [[UITableView alloc] initWithFrame:self.bounds];
  19. _table.separatorStyle = UITableViewCellSeparatorStyleNone;
  20. _table.delegate = self;
  21. _table.dataSource = self;
  22. [_table registerNib:[UINib nibWithNibName:NSStringFromClass([QFTMoreSearchCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([QFTMoreSearchCell class])];
  23. [self addSubview:_table];
  24. self.table = _table;
  25. }
  26. return self;
  27. }
  28. - (void)setDataSource:(NSArray *)dataSource{
  29. _dataSource = dataSource;
  30. [self.table reloadData];
  31. }
  32. #pragma mark - UITableViewDelegate,UITableViewDataSource
  33. //- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  34. // return self.dataSource.count;
  35. //}
  36. //- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  37. // QFTMoreSearchCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([QFTMoreSearchCell class])];
  38. // QFTHome_titleMenuResponseModel *model = self.dataSource[indexPath.row];
  39. //
  40. //
  41. // [cell.icon setImage:[UIImage imageNamed:model.icon]];
  42. // cell.titleLbl.text = model.name;
  43. //
  44. // return cell;
  45. //}
  46. @end