STTableLeftRightLabCell.m 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // STTableLeftRightLabCell.m
  3. // BuguLive
  4. //
  5. // Created by 岳克奎 on 17/4/18.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "STTableLeftRightLabCell.h"
  9. @implementation STTableLeftRightLabCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. self.leftLab.hidden = YES;
  14. QMUIButton *leftBtn = [QMUIButton buttonWithType:UIButtonTypeCustom];
  15. leftBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
  16. [leftBtn setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
  17. leftBtn.titleLabel.font = [UIFont systemFontOfSize:15];
  18. [leftBtn setTitle:ASLocalizedString(@"所在位置")forState:UIControlStateNormal];
  19. leftBtn.imagePosition = QMUIButtonImagePositionLeft;
  20. [leftBtn setImage:[UIImage imageNamed:@"所在位置"] forState:UIControlStateNormal];
  21. leftBtn.spacingBetweenImageAndTitle = 15;
  22. leftBtn.userInteractionEnabled = NO;
  23. self.leftBtn = leftBtn;
  24. [self addSubview:self.leftBtn];
  25. [self.leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  26. make.left.equalTo(@10);
  27. make.centerY.equalTo(@0);
  28. make.width.equalTo(@110);
  29. }];
  30. }
  31. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  32. [super setSelected:selected animated:animated];
  33. // Configure the view for the selected state
  34. }
  35. @end