diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate index 181684a..ec6d195 100644 Binary files a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate and b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 5f2cb07..2db08f3 100644 --- a/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -350,8 +350,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "525" - endingLineNumber = "525" + startingLineNumber = "530" + endingLineNumber = "530" landmarkName = "AppDelegate" landmarkType = "3"> @@ -366,8 +366,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "804" - endingLineNumber = "804" + startingLineNumber = "809" + endingLineNumber = "809" landmarkName = "-applicationWillEnterForeground:" landmarkType = "7"> @@ -382,8 +382,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "269" - endingLineNumber = "269" + startingLineNumber = "274" + endingLineNumber = "274" landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:" landmarkType = "7"> @@ -398,8 +398,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "247" - endingLineNumber = "247" + startingLineNumber = "252" + endingLineNumber = "252" landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:" landmarkType = "7"> @@ -446,8 +446,8 @@ filePath = "tongxin/AppDelegate.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "641" - endingLineNumber = "641" + startingLineNumber = "646" + endingLineNumber = "646" landmarkName = "-handlePushMsg:" landmarkType = "7"> @@ -926,8 +926,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "313" - endingLineNumber = "313" + startingLineNumber = "327" + endingLineNumber = "327" landmarkName = "-configureBubbleImageView:" landmarkType = "7"> @@ -1112,14 +1112,14 @@ BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> @@ -1134,8 +1134,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "540" - endingLineNumber = "540" + startingLineNumber = "554" + endingLineNumber = "554" landmarkName = "-layoutSubviews" landmarkType = "7"> @@ -1154,6 +1154,38 @@ endingLineNumber = "438" landmarkName = "+calculateCellHeightWithMessage:displaysTimestamp:" landmarkType = "7"> + + + + + + @@ -1182,8 +1214,8 @@ filePath = "tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "561" - endingLineNumber = "561" + startingLineNumber = "562" + endingLineNumber = "562" landmarkName = "-layoutSubviews" landmarkType = "7"> @@ -1223,16 +1255,32 @@ + + + + diff --git a/tongxin/AppDelegate.m b/tongxin/AppDelegate.m index e1eed11..8d38fc1 100644 --- a/tongxin/AppDelegate.m +++ b/tongxin/AppDelegate.m @@ -41,6 +41,8 @@ #import "GCDTimerManager.h" + + #define kMusicTime 20 #define videoTimerCount 3 @@ -86,6 +88,9 @@ //} //高德 poi 搜索 [AMapServices sharedServices].apiKey = AMapKey; +// [MAMapView updatePrivacyShow:AMapPrivacyShowStatusDidShow privacyInfo:AMapPrivacyInfoStatusDidContain]; +// [MAMapView updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree]; +// [AMapSearchAPI updatePrivacyShow:(AMapPrivacyShowStatusDidShow) privacyInfo:(AMapPrivacyInfoStatusDidContain)]; [self initIQKeyBorard];//键盘自动调整 diff --git a/tongxin/PrefixHeader.pch b/tongxin/PrefixHeader.pch index 6d5100b..dcb90d7 100644 --- a/tongxin/PrefixHeader.pch +++ b/tongxin/PrefixHeader.pch @@ -35,6 +35,9 @@ #import "MyUILabel.h" #import "UIView+Effects.h" #import +//#import +//#import +//#import //#import ///** @brief 实时音视频呼叫 */ @@ -53,7 +56,7 @@ #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #define IS_IOS_11 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.f) -#define IS_IPHONE_X (IS_IOS_11 && IS_IPHONE && (MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) >= 375 && MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) >= 812)) +#define IS_IPHONE_X (IS_IOS_11 && IS_IPHONE && (MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) >= 375 && MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) >= 812) && [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0) #define iPhoneX (IS_IPHONE_X ? YES : NO) diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Controllers/XHMessageTableViewController/XHMessageTableViewController.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Controllers/XHMessageTableViewController/XHMessageTableViewController.m index fcaf253..623efe7 100755 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Controllers/XHMessageTableViewController/XHMessageTableViewController.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Controllers/XHMessageTableViewController/XHMessageTableViewController.m @@ -1347,10 +1347,13 @@ static CGPoint delayOffset = {0.0}; CGFloat calculateCellHeight = 0; - if ([self.delegate respondsToSelector:@selector(tableView:heightForRowAtIndexPath:targetMessage:)]) { + if ([self.delegate respondsToSelector:@selector(tableView:heightForRowAtIndexPath:targetMessage:)]) + { calculateCellHeight = [self.delegate tableView:tableView heightForRowAtIndexPath:indexPath targetMessage:message]; return calculateCellHeight; - } else { + } + else + { calculateCellHeight = [self calculateCellHeightWithMessage:message atIndexPath:indexPath]; } diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m index e261074..d33e4b8 100644 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageBubbleView.m @@ -118,6 +118,19 @@ + (CGSize)neededSizeForLocalPostion { return CGSizeMake(140, 140); } +// 判断问文字消息内容是否是中文 ++ (BOOL)IsChinese:(NSString *)str +{ + for(int i=0; i< [str length];i++) + { + int a = [str characterAtIndex:i]; + if( a > 0x4e00 && a < 0x9fff) + { + return YES; + } + } + return NO; +} // 计算Cell需要实际Message内容的大小 + (CGFloat)calculateCellHeightWithMessage:(XHMessage *)message { @@ -130,8 +143,9 @@ CGSize bubbleSize; switch (message.messageMediaType) { case XHBubbleMessageMediaTypeText: { + CGFloat ise = [self IsChinese:message.content] ? 2 : 5; CGSize needTextSize = [XHMessageBubbleView neededSizeForText:message.content]; - bubbleSize = CGSizeMake(needTextSize.width + kXHLeftTextHorizontalBubblePadding + kXHRightTextHorizontalBubblePadding , needTextSize.height + kXHHaveBubbleMargin * 2 + kXHTopAndBottomBubbleMargin * 2); //这里*4的原因是:气泡内部的文本也做了margin,而且margin的大小和气泡的margin一样大小,所以需要加上*2的间隙大小 + bubbleSize = CGSizeMake(needTextSize.width + kXHLeftTextHorizontalBubblePadding + kXHRightTextHorizontalBubblePadding , needTextSize.height + kXHHaveBubbleMargin * 2 + kXHTopAndBottomBubbleMargin * 2 + ise); //这里*4的原因是:气泡内部的文本也做了margin,而且margin的大小和气泡的margin一样大小,所以需要加上*2的间隙大小 break; } case XHBubbleMessageMediaTypeVoice: { diff --git a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m index 22e2c50..172bc0f 100644 --- a/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m +++ b/tongxin/ThirdPartyLib/MessageDisplayKit/Classes/Views/MessageContentViews/XHMessageTableViewCell.m @@ -439,6 +439,7 @@ static const CGFloat kXHUserNameLabelHeight = 12; return MAX(bubbleMessageHeight, userInfoNeedHeight)+userHi; } + #pragma mark - Life cycle - (void)setup { diff --git a/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m b/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m index cb80a3c..2aec3b1 100644 --- a/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m +++ b/tongxin/VC/HomeMeg/View/HomeMsgTableViewCell.m @@ -122,7 +122,7 @@ make.bottom.equalTo(iconImg.mas_centerY).inset(3); }]; - UILabel *msgLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:Font_(13) textColor:KKGrey163 text:@"" Radius:0]; + UILabel *msgLabel = [UICommon ui_label:CGRectZero lines:2 align:NSTextAlignmentLeft font:Font_(13) textColor:KKGrey163 text:@"" Radius:0]; self.msgLabel = msgLabel; [self.contentView addSubview:msgLabel]; [msgLabel mas_makeConstraints:^(MASConstraintMaker *make) {