No Description

FKProActivityBaseCell.m 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // FKProActivityBaseCell.m
  3. // FirstLink
  4. //
  5. // Created by ascii on 2016/11/11.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKProActivityBaseCell.h"
  9. @implementation FKProActivityBaseCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  15. [super setSelected:selected animated:animated];
  16. // Configure the view for the selected state
  17. }
  18. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  19. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  20. if (self) {
  21. [self.contentView addSubview:self.bgImageView];
  22. [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  23. make.edges.equalTo(self.contentView);
  24. }];
  25. }
  26. return self;
  27. }
  28. #pragma mark - Method
  29. + (CGFloat)height {
  30. return 50;
  31. }
  32. + (CGFloat)countDownViewWidth {
  33. if (IS_IPHONE_4 || IS_IPHONE_5) {
  34. return 110;
  35. }
  36. return 120;
  37. }
  38. #pragma mark - Property
  39. - (UIImageView *)bgImageView {
  40. if (!_bgImageView) {
  41. _bgImageView = [UIImageView new];
  42. _bgImageView.image = [UIImage imageNamed:@"DetailActivityBgIcon"];
  43. }
  44. return _bgImageView;
  45. }
  46. - (UIImageView *)leftIconView {
  47. if (!_leftIconView) {
  48. _leftIconView = [UIImageView new];
  49. }
  50. return _leftIconView;
  51. }
  52. - (UILabel *)titleLabel{
  53. if (_titleLabel == nil) {
  54. _titleLabel = [[UILabel alloc]init];
  55. _titleLabel.textColor = UIColorFromRGB(0xffffff);
  56. _titleLabel.font = [UIFont boldSystemFontOfSize:15];
  57. _titleLabel.numberOfLines = 2;
  58. }
  59. return _titleLabel;
  60. }
  61. - (FKProCountDownView *)countDownView {
  62. if (!_countDownView) {
  63. _countDownView = [[FKProCountDownView alloc] init];
  64. }
  65. return _countDownView;
  66. }
  67. @end