增加换肤功能
This commit is contained in:
28
TUIKit/TUIChat/BaseCell/TUIChatPopActionsView.m
Normal file
28
TUIKit/TUIChat/BaseCell/TUIChatPopActionsView.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// TUIChatPopActionsView.m
|
||||
// TUIChat
|
||||
//
|
||||
// Created by wyl on 2022/6/13.
|
||||
// Copyright © 2023 Tencent. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TUIChatPopActionsView.h"
|
||||
|
||||
@implementation TUIChatPopActionsView
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
[self updateCorner];
|
||||
}
|
||||
- (void)updateCorner {
|
||||
UIRectCorner corner = UIRectCornerBottomLeft | UIRectCornerBottomRight;
|
||||
CGRect containerBounds = self.bounds;
|
||||
CGRect bounds = CGRectMake(containerBounds.origin.x, containerBounds.origin.y - 1, containerBounds.size.width, containerBounds.size.height);
|
||||
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:corner cornerRadii:CGSizeMake(5, 5)];
|
||||
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
|
||||
maskLayer.frame = self.bounds;
|
||||
maskLayer.path = maskPath.CGPath;
|
||||
self.layer.mask = maskLayer;
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user