Skip to content

Commit 174f005

Browse files
guangyaoguangyao
authored andcommitted
优化 图片显示完毕的效果
1 parent c982db6 commit 174f005

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ios/RCTAuroraIMUI/DWCustomView/DWOrigScorllView.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,14 @@ - (void)addContentView{
194194
- (void)clickTapGest{
195195
NSMutableDictionary *tmpDict = self.imgArr[showIndex];
196196
NSString *strRect = [tmpDict objectForKey:@"rect"];
197+
NSNumber *isEditNum = [tmpDict objectForKey:@"isEdit"];
197198
if (strRect.length) {
198199
CGRect rect = CGRectFromString(strRect);
199200
CGFloat scale = rect.size.width/screenW;
200201
CGFloat tmpY = rect.origin.y - (screenH * scale - rect.size.height)*0.5;
202+
if (isEditNum.boolValue) {
203+
tmpY += 240;
204+
}
201205
if ((tmpY > screenH) || (tmpY+rect.size.height <0)) {
202206
[UIView animateWithDuration:0.3 animations:^{
203207
self.alpha = 0;

ios/RCTAuroraIMUI/RCTMessageListView.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ - (void)clickShowOrigImgView:(NSNotification *)noti{
373373
NSInteger count = [[UIApplication sharedApplication] keyWindow].subviews.count;
374374
topView = [[UIApplication sharedApplication] keyWindow].subviews[count - 2];
375375
}
376+
BOOL isEdit = (self.height >= screenH*0.7) ? NO : YES;
376377
NSMutableArray *rectArr = [NSMutableArray array];
377378
for (UIView *tmpView in self.messageList.messageCollectionView.subviews) {
378379
if ([tmpView isKindOfClass:[IMUIBaseMessageCell class]] ) {
@@ -401,6 +402,8 @@ - (void)clickShowOrigImgView:(NSNotification *)noti{
401402
for (NSMutableDictionary *tmpDict in rectArr) {
402403
if ([msgID isEqualToString:[tmpDict objectForKey:@"msgId"]]) {
403404
[imgDict setObject:[tmpDict objectForKey:@"rect"] forKey:@"rect"];
405+
NSNumber *number = [NSNumber numberWithBool:isEdit];
406+
[imgDict setObject:number forKey:@"isEdit"];
404407
break;
405408
}
406409
}

0 commit comments

Comments
 (0)