Bez popisu

FKPriceWarnConfirmCell.m 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // FKPriceWarnConfirmCell.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/5/26.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKPriceWarnConfirmCell.h"
  9. @implementation FKPriceWarnConfirmCell
  10. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  12. [self addAllSubviews];
  13. self.selectionStyle = UITableViewCellSelectionStyleNone;
  14. self.backgroundView = nil;
  15. self.backgroundColor = [UIColor clearColor];
  16. }
  17. return self;
  18. }
  19. - (void)addAllSubviews{
  20. [self.contentView addSubview:self.confirmBtn];
  21. [self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  22. make.center.equalTo(self.contentView);
  23. make.size.mas_equalTo(CGSizeMake(UISCREENWIDTH - 70, 45));
  24. }];
  25. }
  26. - (UIButton *)confirmBtn{
  27. if (_confirmBtn == nil) {
  28. _confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  29. [_confirmBtn setTitle:@"确 定" forState:UIControlStateNormal];
  30. [_confirmBtn setTitleColor:UIColorFromRGB(0xffffff) forState:UIControlStateNormal];
  31. _confirmBtn.titleLabel.font = [UIFont systemFontOfSize:18];
  32. _confirmBtn.backgroundColor = UIColorFromRGB(0xff6362);
  33. _confirmBtn.layer.cornerRadius = 5.0f;
  34. _confirmBtn.layer.masksToBounds = YES;
  35. }
  36. return _confirmBtn;
  37. }
  38. @end