FLEXTableLeftCell.m 1.0 KB

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 alloc] initWithFrame:CGRectZero];
  16. textLabel.textAlignment = NSTextAlignmentCenter;
  17. textLabel.font = [UIFont systemFontOfSize:13.0];
  18. textLabel.backgroundColor = UIColor.clearColor;
  19. [cell.contentView addSubview:textLabel];
  20. cell.titlelabel = textLabel;
  21. }
  22. return cell;
  23. }
  24. - (void)layoutSubviews {
  25. [super layoutSubviews];
  26. self.titlelabel.frame = self.contentView.frame;
  27. }
  28. @end