123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //
- // SPSBTitleAndContentTableViewCell.m
- // 我的社保
- //
- // Created by shanp on 2021/5/31.
- //
- #import "SPSBTitleAndContentTableViewCell.h"
- #import "SPSBUIGeneralHeader.h"
- @implementation SPSBTitleAndContentTableViewCell
- + (SPSBTitleAndContentTableViewCell *)createSingleDisplayTitleCellWithTitle:(NSString *)title {
- SPSBTitleAndContentTableViewCell *cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
- cell.userInteractionEnabled = false;
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- [cell createTitleLabelWithTitle:title];
- if (![title isEqualToString:@"说明"]) {
- [cell createBottomLine];
- }
-
-
- return cell;
- }
- + (SPSBTitleAndContentTableViewCell *)createSelectCellWithTitle:(NSString *)title content:(NSString *)content {
- SPSBTitleAndContentTableViewCell *cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-
- UIImageView *arrowView = [[UIImageView alloc] initWithImage:jxh_getImage(list_arrow)];
- [cell.contentView addSubview:arrowView];
- [arrowView makeConstraints:^(JXHConstraintMaker *make) {
- make.trailing.equalTo(-15);
- make.centerY.equalTo(cell.contentView);
- }];
-
- [cell createTitleLabelWithTitle:title];
-
- [cell createContentLabelWithContent:content];
- [cell.spsb_contentLabel makeConstraints:^(JXHConstraintMaker *make) {
- make.trailing.equalTo(-34);
- make.centerY.equalTo(0);
- }];
-
- [cell createBottomLine];
-
- return cell;
- }
- - (void)createContentLabelWithContent:(NSString *)content {
- _spsb_contentLabel = [UILabel convenienceWithFont:spsb_font(15) text:content textColor:spsb_666666_color() textAlignment:NSTextAlignmentRight];
- [self.contentView addSubview:_spsb_contentLabel];
- }
- - (void)createTitleLabelWithTitle:(NSString *)title {
- _spsb_titleLabel = [UILabel convenienceWithFont:spsb_font(15) text:title textColor:spsb_333333_color()];
- [self.contentView addSubview:_spsb_titleLabel];
- [_spsb_titleLabel makeConstraints:^(JXHConstraintMaker *make) {
- make.leading.equalTo(15);
- make.centerY.equalTo(0);
- }];
- }
- - (void)createBottomLine {
- _spsb_bottomLine = [self.contentView createLineWithLocation:JXHLineLocationBottom headOffset:15 footOffset:0];
- }
- @end
|