chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:35:01 +08:00
commit a2e318a963
2974 changed files with 158180 additions and 0 deletions
@@ -0,0 +1,15 @@
//
// TLSettingItemDeleteButtonCell.h
// TLChat
//
// Created by 李伯坤 on 2018/3/7.
// Copyright © 2018年 李伯坤. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TLSettingItemDeleteButtonCell : UICollectionViewCell <ZZFlexibleLayoutViewProtocol>
@property (nonatomic, copy) id (^eventAction)(NSInteger, id);
@end
@@ -0,0 +1,61 @@
//
// TLSettingItemDeleteButtonCell.m
// TLChat
//
// Created by 李伯坤 on 2018/3/7.
// Copyright © 2018年 李伯坤. All rights reserved.
//
#import "TLSettingItemDeleteButtonCell.h"
#import "TLSettingItem.h"
@interface TLSettingItemDeleteButtonCell ()
@property (nonatomic, strong) UIButton *button;
@end
@implementation TLSettingItemDeleteButtonCell
+ (CGFloat)viewHeightByDataModel:(id)dataModel
{
return 62.0f;
}
- (void)setViewEventAction:(id (^)(NSInteger, id))eventAction
{
self.eventAction = eventAction;
}
- (void)setViewDataModel:(TLSettingItem *)dataModel
{
self.button.zz_make.title(dataModel.title);
}
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
[self setBackgroundColor:[UIColor clearColor]];
@weakify(self);
self.button = self.contentView.addButton(1)
.backgroundColor([UIColor colorRedForButton]).titleColor([UIColor whiteColor]).titleFont([UIFont systemFontOfSize:18])
.backgroundColorHL([UIColor colorRedForButtonHL]).titleColorHL([[UIColor whiteColor] colorWithAlphaComponent:0.7])
.cornerRadius(5).borderWidth(1).borderColor([UIColor colorGrayLine].CGColor)
.masonry(^(MASConstraintMaker *make) {
make.left.mas_equalTo(15);
make.right.mas_equalTo(-15);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(-15);
})
.eventBlock(UIControlEventTouchUpInside, ^(UIButton *sender) {
@strongify(self);
if (self.eventAction) {
self.eventAction(0, nil);
}
})
.view;
}
return self;
}
@end