diff --git a/NIMKit.podspec b/NIMKit.podspec index 21faf3fe..8d0c7fac 100644 --- a/NIMKit.podspec +++ b/NIMKit.podspec @@ -1,24 +1,24 @@ Pod::Spec.new do |s| s.name = 'NIMKit' - s.version = '2.9.2' - s.summary = 'Netease IM UI Kit' + s.version = '2.9.5' + s.summary = 'NetEase IM UI Kit' s.homepage = 'http://netease.im' - s.license = { :'type' => 'Copyright', :'text' => ' Copyright 2017 Netease '} - s.authors = 'Netease IM Team' - s.source = { :git => 'https://github.com/netease-im/NIM_iOS_UIKit.git', :tag => '2.9.2'} + s.license = { :'type' => 'Copyright', :'text' => ' Copyright 2018 NetEase '} + s.authors = 'NetEase IM Team' + s.source = { :git => 'https://github.com/netease-im/NIM_iOS_UIKit.git', :tag => '2.9.5'} s.platform = :ios, '8.0' s.frameworks = 'CoreText', 'SystemConfiguration', 'AVFoundation', 'CoreTelephony', 'AudioToolbox', 'CoreMedia' , 'VideoToolbox' s.libraries = 'sqlite3.0', 'z', 'c++' s.subspec 'Full' do |cs| cs.source_files = 'NIMKit/NIMKit/**/*.{h,m}' cs.dependency 'NIMKit/Core' - cs.dependency 'NIMSDK', '~> 5.2.2' + cs.dependency 'NIMSDK', '~> 5.3.0' end s.subspec 'Lite' do |cs| cs.source_files = 'NIMKit/NIMKit/**/*.{h,m}' cs.dependency 'NIMKit/Core' - cs.dependency 'NIMSDK_LITE', '~> 5.2.2' + cs.dependency 'NIMSDK_LITE', '~> 5.3.0' end s.subspec 'Core' do |os| diff --git a/NIMKit/NIMKit/Classes/Sections/Session/Object/NIMSessionLayoutImpl.m b/NIMKit/NIMKit/Classes/Sections/Session/Object/NIMSessionLayoutImpl.m index e663dd06..bc57f7d9 100644 --- a/NIMKit/NIMKit/Classes/Sections/Session/Object/NIMSessionLayoutImpl.m +++ b/NIMKit/NIMKit/Classes/Sections/Session/Object/NIMSessionLayoutImpl.m @@ -163,8 +163,6 @@ - (void)adjustTableView visiableHeight = visiableHeight + self.tableView.contentSize.height + contentInsets.top + contentInsets.bottom; visiableHeight = MIN(visiableHeight, rect.size.height); - - rect.origin.y = containerSafeHeight - visiableHeight - self.inputView.nim_height; rect.origin.y = rect.origin.y > 0? 0 : rect.origin.y; @@ -257,6 +255,12 @@ - (void)remove:(NSArray *)indexPaths [self.tableView beginUpdates]; [self.tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; [self.tableView endUpdates]; + NSInteger row = [self.tableView numberOfRowsInSection:0] - 1; + if (row > 0) + { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:0]; + [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; + } } diff --git a/NIMKit/NIMKit/Classes/Sections/Session/View/SessionContentView/NIMSessionFileTransContentView.m b/NIMKit/NIMKit/Classes/Sections/Session/View/SessionContentView/NIMSessionFileTransContentView.m index 588b02a4..fb5bf6d4 100644 --- a/NIMKit/NIMKit/Classes/Sections/Session/View/SessionContentView/NIMSessionFileTransContentView.m +++ b/NIMKit/NIMKit/Classes/Sections/Session/View/SessionContentView/NIMSessionFileTransContentView.m @@ -68,7 +68,7 @@ - (void)refresh:(NIMMessageModel *)data{ self.sizeLabel.font = [[NIMKit sharedKit].config setting:data.message].font; long long size = fileObject.fileLength/1024; - self.sizeLabel.text = [NSString stringWithFormat:@"%zdKB",size?: 1]; + self.sizeLabel.text = [NSString stringWithFormat:@"%lldKB",size?: 1LL]; [self.sizeLabel sizeToFit]; if (self.model.message.deliveryState == NIMMessageDeliveryStateDelivering) { diff --git a/NIMKit/NIMKit/Classes/Sections/Session/ViewController/NIMSessionViewController.m b/NIMKit/NIMKit/Classes/Sections/Session/ViewController/NIMSessionViewController.m index eb3eac9e..b6fb572f 100644 --- a/NIMKit/NIMKit/Classes/Sections/Session/ViewController/NIMSessionViewController.m +++ b/NIMKit/NIMKit/Classes/Sections/Session/ViewController/NIMSessionViewController.m @@ -215,7 +215,7 @@ - (NSString *)sessionTitle - (NSString *)sessionSubTitle{return @"";}; #pragma mark - NIMChatManagerDelegate - +//开始发送 - (void)willSendMessage:(NIMMessage *)message { id interactor = self.interactor; @@ -229,6 +229,14 @@ - (void)willSendMessage:(NIMMessage *)message } } +//上传资源文件成功 +- (void)uploadAttachmentSuccess:(NSString *)urlString + forMessage:(NIMMessage *)message +{ + //如果需要使用富文本推送,可以在这里进行 message apns payload 的设置 +} + + //发送结果 - (void)sendMessage:(NIMMessage *)message didCompleteWithError:(NSError *)error {