diff --git a/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@2x.png b/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@2x.png index e76f047a..c028d489 100644 Binary files a/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@2x.png and b/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@2x.png differ diff --git a/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@3x.png b/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@3x.png index 466f211f..1811eb30 100644 Binary files a/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@3x.png and b/YuMi/Assets.xcassets/utils/common_new_user.imageset/common_new_user@3x.png differ diff --git a/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@2x.png b/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@2x.png index d8eb02b0..f90fba32 100644 Binary files a/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@2x.png and b/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@2x.png differ diff --git a/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@3x.png b/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@3x.png index bf953883..40257f43 100644 Binary files a/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@3x.png and b/YuMi/Assets.xcassets/utils/common_offical.imageset/common_offical@3x.png differ diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m index 3af3e866..c4c49980 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -1174,19 +1174,19 @@ UIImage* image = imageView.image; if (image) { CGFloat scale = image.size.width / image.size.height; - imageView.bounds = CGRectMake(0, 0, 20 * scale, 20); + imageView.bounds = CGRectMake(0, 0, 18 * scale, 18); } else { NSURL *imgUrl = [NSURL URLWithString:imageName]; UIImage *myImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:imgUrl]]; if (myImage) { CGFloat scale = myImage.size.width / myImage.size.height; if (scale == 0) { - imageView.bounds = CGRectMake(0, 0, 60, 20); + imageView.bounds = CGRectMake(0, 0, 60, 18); }else { - imageView.bounds = CGRectMake(0, 0, 20* scale, 20); + imageView.bounds = CGRectMake(0, 0, 18* scale, 18); } } else { - imageView.bounds = CGRectMake(0, 0, 60, 20); + imageView.bounds = CGRectMake(0, 0, 60, 18); } } imageView.contentMode = UIViewContentModeScaleAspectFit; @@ -1218,9 +1218,9 @@ UIImage* image = imageView.image; if (image) { CGFloat scale = image.size.width / image.size.height; - imageView.bounds = CGRectMake(0, 0, 20 * scale, 20); + imageView.bounds = CGRectMake(0, 0, 18 * scale, 18); } else { - imageView.bounds = CGRectMake(0, 0, 20, 20); + imageView.bounds = CGRectMake(0, 0, 18, 18); } imageView.layer.masksToBounds = YES; imageView.contentMode = UIViewContentModeScaleAspectFit; @@ -1235,7 +1235,13 @@ if (imageName == nil && imageName.length <= 0) { return nil; } - return [self createImageAttribute:[UIImage imageNamed:imageName]]; + UIImageView *imaveView = [[UIImageView alloc]init]; + imaveView.image = [UIImage imageNamed:imageName]; + CGFloat scale = (CGFloat)imaveView.image.size.width / (CGFloat)imaveView.image.size.height; + imaveView.bounds = CGRectMake(0, 0, 16 * scale, 16); + NSMutableAttributedString * attrString = [NSMutableAttributedString yy_attachmentStringWithContent:imaveView contentMode:UIViewContentModeScaleAspectFit attachmentSize:CGSizeMake(imaveView.frame.size.width, imaveView.frame.size.height) alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter]; + return attrString; + } /// 生成本地一个图片的富文本