Files
TIMSDK/iOS/TUIKit/TUIChat/BaseCell/CellUI/TUIChatPopActionsView.m
T
2023-01-06 19:16:16 +08:00

28 lines
832 B
Objective-C

//
// TUIChatPopActionsView.m
// TUIChat
//
// Created by wyl on 2022/6/13.
//
#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