FLEXTableLeftCell.m 963 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // FLEXTableLeftCell.m
  3. // FLEX
  4. //
  5. // Created by Peng Tao on 15/11/24.
  6. // Copyright © 2015年 f. All rights reserved.
  7. //
  8. #import "FLEXTableLeftCell.h"
  9. @implementation FLEXTableLeftCell
  10. + (instancetype)cellWithTableView:(UITableView *)tableView {
  11. static NSString *identifier = @"FLEXTableLeftCell";
  12. FLEXTableLeftCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
  13. if (!cell) {
  14. cell = [[FLEXTableLeftCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
  15. UILabel *textLabel = [UILabel new];
  16. textLabel.textAlignment = NSTextAlignmentCenter;
  17. textLabel.font = [UIFont systemFontOfSize:13.0];
  18. [cell.contentView addSubview:textLabel];
  19. cell.titlelabel = textLabel;
  20. }
  21. return cell;
  22. }
  23. - (void)layoutSubviews {
  24. [super layoutSubviews];
  25. self.titlelabel.frame = self.contentView.frame;
  26. }
  27. @end