腾讯IM集成DEMO 优化,便于集成开发,在项目中使用相当的方便。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-13 17:43 testIM
文件 6148 2017-11-13 17:43 testIM.DS_Store
目录 0 2017-11-16 11:21 __MACOSX
目录 0 2017-11-16 11:21 __MACOSX estIM
文件 120 2017-11-13 17:43 __MACOSX estIM._.DS_Store
目录 0 2017-11-16 11:09 testIM estIM
文件 8196 2017-11-07 13:17 testIM estIM.DS_Store
目录 0 2017-11-16 11:21 __MACOSX estIM estIM
文件 120 2017-11-07 13:17 __MACOSX estIM estIM._.DS_Store
文件 501 2017-08-13 20:16 testIM estIMAppDelegate.h
文件 172 2017-08-13 20:16 __MACOSX estIM estIM._AppDelegate.h
文件 2932 2017-11-16 11:09 testIM estIMAppDelegate.m
文件 565 2017-11-16 11:09 __MACOSX estIM estIM._AppDelegate.m
目录 0 2017-11-14 16:34 testIM estIMAssets.xcassets
文件 20484 2017-11-06 18:06 testIM estIMAssets.xcassets.DS_Store
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassets
文件 120 2017-11-06 18:06 __MACOSX estIM estIMAssets.xcassets._.DS_Store
目录 0 2017-11-01 17:58 testIM estIMAssets.xcassetsadd.imageset
文件 1135 2017-08-13 20:16 testIM estIMAssets.xcassetsadd.imagesetadd@2x.png
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassetsadd.imageset
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd.imageset._add@2x.png
文件 303 2017-08-13 20:16 testIM estIMAssets.xcassetsadd.imagesetContents.json
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd.imageset._Contents.json
文件 172 2017-11-01 17:58 __MACOSX estIM estIMAssets.xcassets._add.imageset
目录 0 2017-11-01 17:58 testIM estIMAssets.xcassetsadd_friend.imageset
文件 1865 2017-08-13 20:16 testIM estIMAssets.xcassetsadd_friend.imagesetadd_friend@2x.png
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset._add_friend@2x.png
文件 310 2017-08-13 20:16 testIM estIMAssets.xcassetsadd_friend.imagesetContents.json
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset._Contents.json
文件 172 2017-11-01 17:58 __MACOSX estIM estIMAssets.xcassets._add_friend.imageset
............此处省略2342个文件信息
//
// AppDelegate.m
// TIMChat
//
// Created by AlexiChen on 16/1/29.
// Copyright © 2016年 AlexiChen. All rights reserved.
//
#import “AppDelegate.h“
#import
#import “WXApi.h“
@interface AppDelegate ()
@end
@implementation AppDelegate
- (void)configAppLaunch
{
// 作App配置
[[NSClassFromString(@“UICalloutBarButton“) appearance] settitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
}
- (void)enterMainUI
{
ConversationListViewController *convVC = [[ConversationListViewController alloc] init];
NavigationViewController *convNVC = [[NavigationViewController alloc] initWithRootViewController:convVC];
self.window.rootViewController = convNVC;
}
+ (instancetype)sharedAppDelegate
{
return (AppDelegate *)[UIApplication sharedApplication].delegate;
}
- (void)pushToChatViewControllerWith:(IMAUser *)user
{
NavigationViewController *curNav = (NavigationViewController *)[self navigationViewController];
// 选的中会话tab
// 先检查当前栈中是否聊天界面
NSArray *array = [curNav viewControllers];
for (UIViewController *vc in array)
{
if ([vc isKindOfClass:[IMAChatViewController class]])
{
// 有则返回到该界面
IMAChatViewController *chat = (IMAChatViewController *)vc;
[chat configWithUser:user];
// chat.hidesBottomBarWhenPushed = YES;
[curNav popToViewController:chat animated:YES];
return;
}
}
#if kTestChatAttachment
// 无则重新创建
ChatViewController *vc = [[CustomChatUIViewController alloc] initWith:user];
#else
ChatViewController *vc = [[IMAChatViewController alloc] initWith:user];
#endif
if ([user isC2CType])
{
TIMConversation *imconv = [[TIMManager sharedInstance] getConversation:TIM_C2C receiver:user.userId];
if ([imconv getUnReadMessageNum] > 0)
{
[vc modifySendInputStatus:SendInputStatus_Send];
}
}
vc.hidesBottomBarWhenPushed = YES;
[curNav pushViewController:vc withBacktitle:@“返回“ animated:YES];
// if (self.selectedIndex == 0)
// {
//
// }
// else
// {
// NavigationViewController *chatNav = (NavigationViewController *)[[self viewControllers] objectAtIndex:0];
//
//#if kTestChatAttachment
// // 无则重新创建
// ChatViewController *vc = [[CustomChatUIViewController alloc] initWith:user];
//#else
// ChatViewController *vc = [[IMAChatViewController alloc] initWith:user];
//#endif
// vc.hidesBottomBarWhenPushed = YES;
// [chatNav pushViewController:vc withBacktitle:@“返回“ animated:YES];
//
// [self setSelectedIndex:0];
//
// if (curNav.viewControllers.count != 0)
// {
// [curNav popToRootViewControllerAnimated:YES];
// }
//
// }
}
@end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-13 17:43 testIM
文件 6148 2017-11-13 17:43 testIM.DS_Store
目录 0 2017-11-16 11:21 __MACOSX
目录 0 2017-11-16 11:21 __MACOSX estIM
文件 120 2017-11-13 17:43 __MACOSX estIM._.DS_Store
目录 0 2017-11-16 11:09 testIM estIM
文件 8196 2017-11-07 13:17 testIM estIM.DS_Store
目录 0 2017-11-16 11:21 __MACOSX estIM estIM
文件 120 2017-11-07 13:17 __MACOSX estIM estIM._.DS_Store
文件 501 2017-08-13 20:16 testIM estIMAppDelegate.h
文件 172 2017-08-13 20:16 __MACOSX estIM estIM._AppDelegate.h
文件 2932 2017-11-16 11:09 testIM estIMAppDelegate.m
文件 565 2017-11-16 11:09 __MACOSX estIM estIM._AppDelegate.m
目录 0 2017-11-14 16:34 testIM estIMAssets.xcassets
文件 20484 2017-11-06 18:06 testIM estIMAssets.xcassets.DS_Store
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassets
文件 120 2017-11-06 18:06 __MACOSX estIM estIMAssets.xcassets._.DS_Store
目录 0 2017-11-01 17:58 testIM estIMAssets.xcassetsadd.imageset
文件 1135 2017-08-13 20:16 testIM estIMAssets.xcassetsadd.imagesetadd@2x.png
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassetsadd.imageset
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd.imageset._add@2x.png
文件 303 2017-08-13 20:16 testIM estIMAssets.xcassetsadd.imagesetContents.json
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd.imageset._Contents.json
文件 172 2017-11-01 17:58 __MACOSX estIM estIMAssets.xcassets._add.imageset
目录 0 2017-11-01 17:58 testIM estIMAssets.xcassetsadd_friend.imageset
文件 1865 2017-08-13 20:16 testIM estIMAssets.xcassetsadd_friend.imagesetadd_friend@2x.png
目录 0 2017-11-16 11:21 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset._add_friend@2x.png
文件 310 2017-08-13 20:16 testIM estIMAssets.xcassetsadd_friend.imagesetContents.json
文件 172 2017-08-13 20:16 __MACOSX estIM estIMAssets.xcassetsadd_friend.imageset._Contents.json
文件 172 2017-11-01 17:58 __MACOSX estIM estIMAssets.xcassets._add_friend.imageset
............此处省略2342个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)