- (void)viewDidLoad {
[super viewDidLoad]; UIImageView *ImageView01 = [[UIImageView alloc] init];
[ImageView01 setFrame:CGRectMake(, , , )];
[ImageView01 setImage:[UIImage imageNamed:@"style.jpg"]];
[self.view addSubview:ImageView01]; UIImage *bubble = [UIImage imageNamed:@"icon_chat_right_bg"];
UIImageView *ImageView = [[UIImageView alloc] init];
[ImageView setFrame:ImageView01.frame];
[ImageView setImage:[bubble stretchableImageWithLeftCapWidth: topCapHeight:]]; CALayer *layer = ImageView.layer;
layer.frame = (CGRect){{,},ImageView.layer.frame.size};
ImageView01.layer.mask = layer;
[ImageView01 setNeedsDisplay];

如何实现聊天软件的图片显示的剪裁后的气泡呢

iOS 图片 的 聊天气泡显示 Objective-C-LMLPHP

04-16 02:28