增加换肤功能
This commit is contained in:
45
QXLive/Mine(音域)/View/QXMyHistoryHeaderView.m
Normal file
45
QXLive/Mine(音域)/View/QXMyHistoryHeaderView.m
Normal file
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// QXMyHistoryHeaderView.m
|
||||
// IsLandVoice
|
||||
//
|
||||
// Created by 启星 on 2025/4/12.
|
||||
//
|
||||
|
||||
#import "QXMyHistoryHeaderView.h"
|
||||
|
||||
@implementation QXMyHistoryHeaderView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, 46);
|
||||
[self createViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)createViews{
|
||||
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"history_icon"]];
|
||||
imageView.frame = CGRectMake(16, 0, 13, 13);
|
||||
imageView.centerY = self.centerY;
|
||||
[self addSubview:imageView];
|
||||
|
||||
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(imageView.right+6, 0, 150, 24)];
|
||||
titleLabel.centerY = self.centerY;
|
||||
titleLabel.text = @"历史足迹";
|
||||
titleLabel.textColor = [UIColor colorWithHexString:@"#333333"];
|
||||
titleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
[self addSubview:titleLabel];
|
||||
|
||||
UIButton *clearBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width-self.height, 0, self.height, self.height)];
|
||||
[clearBtn addTarget:self action:@selector(clearAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[clearBtn setImage:[UIImage imageNamed:@"room_history_delete"] forState:(UIControlStateNormal)];
|
||||
[self addSubview:clearBtn];
|
||||
}
|
||||
|
||||
-(void)clearAction{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickClearBtn)]) {
|
||||
[self.delegate didClickClearBtn];
|
||||
}
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user