小说绘上架版本
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// TFSetBasicTableViewCell.h
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFBasicTableViewCell.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFSetBasicTableViewCell : TFBasicTableViewCell
|
||||
|
||||
@property (nonatomic ,strong) UILabel *leftTitleLabel;
|
||||
@property (nonatomic ,copy) NSString *leftTitleText;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// TFSetBasicTableViewCell.m
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFSetBasicTableViewCell.h"
|
||||
|
||||
@implementation TFSetBasicTableViewCell
|
||||
|
||||
- (void)createSubviews
|
||||
{
|
||||
[super createSubviews];
|
||||
|
||||
self.leftTitleLabel = [[UILabel alloc] init];
|
||||
self.leftTitleLabel.font = kMainFont;
|
||||
self.leftTitleLabel.textColor = kBlackColor;
|
||||
self.leftTitleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.contentView addSubview:self.leftTitleLabel];
|
||||
|
||||
[self.leftTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView.mas_left).with.offset(kMargin);
|
||||
make.top.mas_equalTo(self.contentView.mas_top);
|
||||
make.right.mas_equalTo(self.contentView.mas_right).with.offset(- kMargin);
|
||||
make.height.mas_equalTo(50);
|
||||
make.bottom.mas_equalTo(self.contentView.mas_bottom).priorityLow();
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setLeftTitleText:(NSString *)leftTitleText
|
||||
{
|
||||
_leftTitleText = leftTitleText;
|
||||
|
||||
self.leftTitleLabel.text = leftTitleText;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// TFSetLogoutTableViewCell.h
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TFSetBasicTableViewCell.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFSetLogoutTableViewCell : TFSetBasicTableViewCell
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// TFSetLogoutTableViewCell.m
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFSetLogoutTableViewCell.h"
|
||||
|
||||
@interface TFSetLogoutTableViewCell ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation TFSetLogoutTableViewCell
|
||||
|
||||
- (void)createSubviews
|
||||
{
|
||||
[super createSubviews];
|
||||
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
self.leftTitleLabel.text = TFLocalizedString(@"退出登录");
|
||||
self.leftTitleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.leftTitleLabel.textColor = kWhiteColor;
|
||||
self.leftTitleLabel.backgroundColor = kRedColor;
|
||||
self.leftTitleLabel.layer.cornerRadius = 4;
|
||||
self.leftTitleLabel.clipsToBounds = YES;
|
||||
|
||||
[self.leftTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(40);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// TFSetNormalTableViewCell.h
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TFSetBasicTableViewCell.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFSetNormalTableViewCell : TFSetBasicTableViewCell
|
||||
|
||||
@property (nonatomic ,copy) NSString *rightTitleText;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// TFSetNormalTableViewCell.m
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFSetNormalTableViewCell.h"
|
||||
|
||||
@interface TFSetNormalTableViewCell ()
|
||||
{
|
||||
UILabel *rightTitleLabel;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation TFSetNormalTableViewCell
|
||||
|
||||
- (void)createSubviews
|
||||
{
|
||||
[super createSubviews];
|
||||
|
||||
UIImageView *connerImage = [[UIImageView alloc] init];
|
||||
connerImage.image = [UIImage imageNamed:@"public_more"];
|
||||
[self.contentView addSubview:connerImage];
|
||||
|
||||
[connerImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView.mas_right).with.offset(- kMargin);
|
||||
make.centerY.mas_equalTo(self.contentView.mas_centerY);
|
||||
make.width.height.mas_equalTo(10);
|
||||
}];
|
||||
|
||||
rightTitleLabel = [[UILabel alloc] init];
|
||||
rightTitleLabel.font = kFont12;
|
||||
rightTitleLabel.textColor = kGrayTextColor;
|
||||
rightTitleLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:rightTitleLabel];
|
||||
|
||||
[rightTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView.mas_centerX);
|
||||
make.centerY.mas_equalTo(self.contentView.mas_centerY);
|
||||
make.right.mas_equalTo(connerImage.mas_left).with.offset(- 5);
|
||||
make.height.mas_equalTo(self.leftTitleLabel.mas_height);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setRightTitleText:(NSString *)rightTitleText
|
||||
{
|
||||
rightTitleLabel.text = rightTitleText;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// TFSetSwitchTableViewCell.h
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "TFSetBasicTableViewCell.h"
|
||||
#import "KLSwitch.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFSetSwitchTableViewCell : TFSetBasicTableViewCell
|
||||
|
||||
@property (nonatomic ,strong) KLSwitch *switchButton;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// TFSetSwitchTableViewCell.m
|
||||
// WXReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/2.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFSetSwitchTableViewCell.h"
|
||||
|
||||
@interface TFSetSwitchTableViewCell ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation TFSetSwitchTableViewCell
|
||||
|
||||
- (void)createSubviews
|
||||
{
|
||||
[super createSubviews];
|
||||
|
||||
self.switchButton = [[KLSwitch alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 51 - kHalfMargin - kQuarterMargin, 10, 51, 31)];
|
||||
self.switchButton.transform = CGAffineTransformMakeScale(0.7, 0.7);//缩放
|
||||
self.switchButton.onTintColor = kMainColor;
|
||||
[self.contentView addSubview:self.switchButton];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user