netease-kit / nim-uikit-ios Goto Github PK
View Code? Open in Web Editor NEW云信 IM UIKit 是基于 NIM SDK(网易云信 IM SDK)开发的一款即时通讯 UI 组件库,包括聊天、会话、圈组、搜索、群管理等组件。通过 IM UIKit,可快速集成包含 UI 界面的即时通讯应用。
云信 IM UIKit 是基于 NIM SDK(网易云信 IM SDK)开发的一款即时通讯 UI 组件库,包括聊天、会话、圈组、搜索、群管理等组件。通过 IM UIKit,可快速集成包含 UI 界面的即时通讯应用。
我接入云信的界面库后,聊天界面的语音按钮响应事件的问题。此问题已解决。
在输入框对6Plus的兼容性,当6plus输入多行(大于10)时,输入框不会自动滚动到底部
会话页面的聊天记录不是存在本地数据库的吗?
Specs satisfying the SVProgressHUD (= 2.1.2), SVProgressHUD (~> 2.0.3)
dependency were found, but they required a higher minimum deployment target.
可否提供weex的支持
具体做了一下,发现一些小问题。
1、 关于bundle资源文件的路径, 三个bundle的设置是不统一的,pod引入之后,需要设置resource的资源目录为mainBundle。 其他两个则不需要,这很奇怪,还是写清楚会比较好 ,免得开发者自己跟代码。而且最好还是统一吧。
2、cell相关的一些自定义,比如说cell的背景色,我看到是代码里直接写死,其实完全也可以抛出的。
3、以后是否可以加个版本更新说明,我们正好赶在3.2前做的集成,然后你们就发布3.2了,并不知道具体需要修改哪里。一点一点摸出来的,蛮费时间。
希望可以采纳
使用pod 'NIMKit/Full'导入完整的nimkit的时候,最新的版本是1.3.0,但是导入完成之后nimsdk的文件夹有内容,但是nimkit的文件夹是空的
在NIMSessionViewController中,似乎没有提供接口来设置用户的本地默认头像。
如何来设置聊天页面中用户的本地默认头像呢?
你好,我想问一下,如果某种自定义消息attachment所对应的UI比较复杂,会根据attachment的属性不同情况而展示不同的UI,那么这种情况怎么处理会比较友好一点?按照demo的NTESWhiteboardAttachment
类,它是在- (CGSize)contentSize:(NIMMessage *)message cellWidth:(CGFloat)width
方法里面将其所对应的contentViewNTESSessionWhiteBoardContentView
里面的UI控件进行相应的属性设置,然后计算。如果有多个的话,那我岂不是在NTESWhiteboardAttachment
和NTESSessionWhiteBoardContentView
里面都要做重复的布局计算操作。
我以前的方法是在 contentView 相同签名的- (CGSize)contentSize:(NIMMessageModel *)messageModel cellWidth:(CGFloat)width
方法A里面做的处理,在这个A方法里面再调用方法B,并且在布局的时候也会调用方法B,具体的布局实现是在方法B里面。具体实现代码如下。总感觉这样写不太友好,希望网易的大大能够给出个好一点的方案,谢谢!
#pragma mark - NTESCustomAttachmentInfo Delegate
/**
* 查询某个消息对应的ContentView类名
*
* @param message message description
*
* @return return value description
*/
- (NSString *)cellContent:(NIMMessageModel *)messageModel {
return NSStringFromClass([NIMSessionSelfContentView class]);
}
/**
* 查询某个消息对应的内容区域的大小
*
* @param message <#message description#>
* @param width <#width description#>
*
* @return <#return value description#>
*/
- (CGSize)contentSize:(NIMMessageModel *)messageModel cellWidth:(CGFloat)width {
return [[NIMSessionSelfContentView new] contentSize:messageModel cellWidth:width];
}
/**
* cell内容距离气泡的内间距
*
* @param message <#message description#>
*
* @return <#return value description#>
*/
- (UIEdgeInsets)contentViewInsets:(NIMMessageModel *)messageModel {
return [[NIMSessionSelfContentView new] contentViewInsets:messageModel];
}
// 方法A
- (CGSize)contentSize:(NIMMessageModel *)messageModel cellWidth:(CGFloat)width {
return [self layoutContentViewIsRealSubViews:NO message:messageModel cellWidth:width];
}
- (void)layoutSubviews {
[super layoutSubviews];
[self layoutContentViewIsRealSubViews:YES message:self.model cellWidth:0];
}
/**
* 刷新内容视图 方法B
*
* @param isReal isReal 是否是真的刷新 在计算contentSize的时候不是真的刷新,只是布局而已
*
* @return 内容大小
*/
- (CGSize)layoutContentViewIsRealSubViews:(BOOL)isReal message:(NIMMessageModel *)messageModel cellWidth:(CGFloat)width {
UIImageView *thumbImageView1 = nil;
UILabel *titleLabel1 = nil;
UILabel *descLabel1 = nil;
if (isReal) {
thumbImageView1 = _thumbImageView;
titleLabel1 = _titleLabel;
descLabel1 = _descLabel;
} else {
NSArray *subViews = [self setupSubviewsIsNeedAdd:NO];
thumbImageView1 = [subViews firstObject];
titleLabel1 = subViews[1];
descLabel1 = [subViews lastObject];
}
// 在这里面做相应的contentsize计算
//xxxxxxxxx
return CGSizeZero;
}
#pragma mark - inner method
- (NSArray *)setupSubviewsIsNeedAdd:(BOOL)isNeed {
UIImageView *thumbImageView1 = [UIImageView new];
UILabel *titleLabel1 = [UILabel new];
titleLabel1.backgroundColor = [UIColor clearColor];
titleLabel1.font = [UIFont systemFontOfSize:NIMKit_Message_Font_Size];
titleLabel1.numberOfLines = 3;
titleLabel1.textColor = [UIColor colorWithNumber:11];
UILabel *descLabel1 = [UILabel new];
descLabel1.backgroundColor = [UIColor clearColor];
descLabel1.font = [UIFont systemFontOfSize:14.0];
descLabel1.numberOfLines = 3;
descLabel1.lineBreakMode = NSLineBreakByWordWrapping;
descLabel1.textColor = [UIColor colorWithNumber:4];
if (isNeed) {
_thumbImageView = thumbImageView1;
_titleLabel = titleLabel1;
_descLabel = descLabel1;
[self addSubview:_thumbImageView];
[self addSubview:_titleLabel];
[self addSubview:_descLabel];
} else {
return @[thumbImageView1, titleLabel1, descLabel1];
}
return @[];
}
错误:[!] Error installing NIMKit
[!] /usr/local/bin/git clone https://github.com/netease-im/NIM_iOS_UIKit.git /var/folders/g3/r8328tc109769fx71cnm85lm0000gn/T/d20161217-61847-121cm75 --template= --single-branch --depth 1 --branch 1.0.5
Cloning into '/var/folders/g3/r8328tc109769fx71cnm85lm0000gn/T/d20161217-61847-121cm75'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
已经做过如下处理
1.换网络尝试还是不行(只装一个xocde也不行)
2.给git 增加缓存数量
git config --global http.postBuffer 524288000
3.stackOverflow上用如下命令操作后在 pod install (pod install --no-repo-update)
$ brew remove git
$ brew remove curl
$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git
4.第四种方法也不行
http://blog.csdn.net/fatalibud/article/details/48649963
$ brew tap homebrew/dupes
$ brew tap homebrew/versions
$ brew tap homebrew/php
$ brew install --with-openssl curl
$ brew install --with-fpm --with-homebrew-curl --with-homebrew-openssl --without-snmp php55
$ brew install php55-mcrypt
$ php -i | grep "SSL Version"
我的Podfile是这样的:【SDWebImage这些都是可以安装的】
platform :ios, '8.0'
target "HuNIMDemo" do
pod 'NIMKit/Lite'
end
Undefined symbols for architecture x86_64:
"_NTESNotificationLogout", referenced from:
___50-[NTESSettingViewController logoutCurrentAccount:]_block_invoke_2 in NTESSettingViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
请问一下这个问题怎么解决
现在的需求是 我要拿到当前对话中的图片跟视频,进入类似微信那样的预览页面,这时候俩问题。
1、 我拿不到当前对话数据。 通过history拿我也不知道当前用户拉出来的有多少条。
2、我需要cell中image相对于window的位置。 这样我就必须拿到cell才可以。
这个需求蛮紧的,你们有啥建议吗?
In NIMKitUtil.m file, so many errors occured, i see the reason is serval Enums in switch struct, there is not exist the Type,but you case it,so the compile failed,
如题,我在项目中使用 swift 进行开发,想要修改sessionTitle的大小和颜色。但 swift 调用 OC 的时候,只能使用 NIMSessionViewController.h 文件中暴露出来的方法和属性,然而 titleLabel 并没有暴露出来。请问我现在有其他办法可以修改 title 的属性么?
在iOS10上输入拼音点删除时,自动把剩余的拼音当成英文填充到输入框了,而并不是想iOS8一样,删除一个字母后仍然是拼音联想状态,还望告知一下兼容办法,谢谢
会话资源的默认头像丢失了,希望补充一下吧 ! 资源路径为:NIMKitResource.bundle/avatar_user
版本是 pod 'NIMKit', '~> 1.7.0'
在聊天页面NIMSessionViewController这边,如果有设置显示导航栏的话,发现输入框的偏移量总是不对,导致输入框被键盘遮挡。后面跟了源代码,在NIMInputView.m这个文件中的keyboardWillChangeFrame方法中修改找到了问题的原因。原来:self.keyBoardFrameTop=endFrame.origin.y,这个在没有导航栏的时候是没有问题的,但是如果有导航栏的话,就会存在64像素的偏差,所以我改成了:self.keyBoardFrameTop = self.superview.nim_height-endFrame.size.height;就能解决这个问题了。第一次使用云讯sdk,所以也不是很清楚这样改有没有问题,希望作者能看下并反馈给我哈!
当表情包有多组数据时,加载表情包会有一定的耗时,会导致push会话页面时有相应的延迟
接入了该库后,发现界面非常卡顿,用工具分析后,发现 NIMAvatarImageView 中的 CGContextDrawImage 操作非常耗时,有好的解决方案么?
pod 安装太慢了,1个小时都没完
如题, @某人的功能需要长按头像这种事件。
pod install打印如下
Installing NIMKit (1.3.0)
Installing NIMSDK (3.6.0)
但是发现Pods>NIMKit内全部为空
就是我想在文本消息下面添加一些附加的本地属性,所以想问一下消息对应的cell的高度在哪里可以控制?
能否将NIMKit的对NIMSDK的依赖更新为最新的NIMSDK?发现pod的时候会出现NIMSDK版本不是最新版的问题
现在kit中的 图片 视频 cell 都会在下面铺image,看起来还是有那么点不和谐的,不知道怎么做比较合适?
错误代码是找不到SDWebImageCompletionBlock
现在的处理是这里设置了一个断言供 debug, Release 版不支持的消息会返回空的 cell 导致崩溃。我觉得比较好的一个处理是对不支持的消息专门设置一个提示的 cell 来保证旧版本的兼容性。
pod install正常,但是import时报错。
附上项目路径,swift项目里,一直报错。
https://github.com/hengchengfei/NIMTest.git
NIMSDK_LITE (~> 3.9.0)
required by NIMKit/Lite (1.6.0)
None of your spec sources contain a spec satisfying the dependency: NIMSDK_LITE (~> 3.9.0)
.
似乎与线上的Spec没有同步导致的问题吧。
不打开时正常,但想用Swift...
The target has transitive dependencies that include static binaries: (/Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMSDK/libNIMSDK.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/libNIMAVChat.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/Libs/libnio.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/Libs/libnts.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/Libs/libnvs.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/Libs/libopenh264.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMAVChat/Libs/libopus.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMSDK/Libs/libaacplus.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMSDK/Libs/libcrypto.a, /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMSDK/Libs/libevent.a, and /Users/cloud/code/aiyuebang/Pods/NIMSDK/SDK/NIMSDK/Libs/libssl.a)
Pod 重新 setup 了一下,然后执行
Pod install
还是找不到 NIMKit,这是?
错误信息:unable to find a specification for ‘NIMKit’
如题,使用swift开发。报错内容为:
The 'Pods-swift' target has transitive dependencies that include static binaries
尝试注释 use_frameworks! 后 pod install 正常,但无法再引入其他的库。会提示缺少 use_frameworks!
请问有解决办法么?
Unable to find a specification for NIMKit
点击开始播放语音然后滚动列表,当重新滚动到播放语音的这个 cell 的时候显示的不是正在播放的状态,这个应该在每次为 cell 配置内容的时候查询一下当前播放的内容,现在只是在开始播放的时候设置了代理。
报错target has transitive dependencies that include static binaries:NIMSDK/xxxxx.a
应该是NIMCustomAttachment...
步骤:
结果:“按住说话”按钮高度不对。
NIMInputToolBar
中在方法 - (void)adjustTextAndRecordView
中始终设置了 self.recordButton.frame = self.inputTextBkgImage.frame;
, 导致了按钮高度一直等于输入框背景高度。
下载项目后,执行pod install
下载完所有依赖库后,打开xcode。有一个错误 'NIMAVChat.h' file not found
注释该行后,又出现NIMAVChatDefs.h file not found
貌似这个NIMAVChat开头的类都没有
输入栏有一部分跑到屏幕底部之外去了.
如题, 真的是跟了很久代码, 但是看的很晕。 只看到一个showleft。
通过漫游获取的聊天记录信息,在对话页面显示是黑色的,没有缩略图怎么解决?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.