You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

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