增加换肤功能

This commit is contained in:
启星
2025-08-14 10:07:49 +08:00
parent f6964c1e89
commit 4f9318d98e
8789 changed files with 978530 additions and 2 deletions

View File

@@ -0,0 +1,54 @@
//
// YBIBVideoTopBar.m
// YBImageBrowserDemo
//
// Created by on 2019/7/11.
// Copyright © 2019 . All rights reserved.
//
#import "YBIBVideoTopBar.h"
#import "YBIBIconManager.h"
@interface YBIBVideoTopBar ()
@property (nonatomic, strong) UIButton *cancelButton;
@end
@implementation YBIBVideoTopBar
#pragma mark - life cycle
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self addSubview:self.cancelButton];
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
CGFloat buttonWidth = 54;
self.cancelButton.frame = CGRectMake(0, 0, buttonWidth, self.bounds.size.height);
}
#pragma mark - public
+ (CGFloat)defaultHeight {
return 50;
}
#pragma mark - getter
- (UIButton *)cancelButton {
if (!_cancelButton) {
_cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_cancelButton setImage:YBIBIconManager.sharedManager.videoCancelImage() forState:UIControlStateNormal];
_cancelButton.layer.shadowColor = UIColor.darkGrayColor.CGColor;
_cancelButton.layer.shadowOffset = CGSizeMake(0, 1);
_cancelButton.layer.shadowOpacity = 1;
_cancelButton.layer.shadowRadius = 4;
}
return _cancelButton;
}
@end