56 lines
1.6 KiB
Objective-C
56 lines
1.6 KiB
Objective-C
//
|
|
// QXSettingCell.h
|
|
// QXLive
|
|
//
|
|
// Created by 启星 on 2025/5/12.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
typedef NS_ENUM(NSInteger) {
|
|
/// 显示左侧label 右侧lable 向右箭头
|
|
QXSettingCellTypeNormal = 0,
|
|
/// 只显示右侧详细信息
|
|
QXSettingCellTypeOnlyDetail = 1,
|
|
/// 只显示箭头
|
|
QXSettingCellTypeOnlyArrow,
|
|
/// 开关
|
|
QXSettingCellTypeSwitch,
|
|
/// 标题在上 详情在下 带箭头
|
|
QXSettingCellTypeTitleTopAndArrow,
|
|
/// 标题在上 详情在下 不带箭头
|
|
QXSettingCellTypeTitleTopNoArrow,
|
|
/// 购买数量
|
|
QXSettingCellTypeBuyCount
|
|
}QXSettingCellType;
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
@protocol QXSettingCellDelegate <NSObject>
|
|
|
|
@optional
|
|
|
|
-(void)reductionDidClickWithTotalNum:(NSString*)totalNum;
|
|
|
|
-(void)addDidClickWithTotalNum:(NSString*)totalNum;
|
|
|
|
@end
|
|
@interface QXSettingCell : UITableViewCell
|
|
@property (strong, nonatomic) UILabel *titleLabel;
|
|
@property (strong, nonatomic) UILabel *detailLabel;
|
|
@property (strong, nonatomic) UIImageView *rightArrow;
|
|
@property (strong, nonatomic) NSLayoutConstraint *rightConstraint;
|
|
@property (strong, nonatomic) UIButton *btnSwitch;
|
|
@property (strong, nonatomic) UIView *lineView;
|
|
@property (assign, nonatomic) QXSettingCellType cellType;
|
|
@property (assign, nonatomic) BOOL needLine;
|
|
|
|
@property (strong, nonatomic) UIView *buyCountView;
|
|
@property (strong, nonatomic) UIButton *reductionBtn;
|
|
@property (strong, nonatomic) UITextField *textField;
|
|
@property (strong, nonatomic) UIButton *addBtn;
|
|
|
|
@property (weak, nonatomic) id<QXSettingCellDelegate> delegate;
|
|
|
|
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|