Commit e4443f6f by 徐利超

update 暂存版本1

parent cf5e9be6
......@@ -10,12 +10,21 @@
NS_ASSUME_NONNULL_BEGIN
@protocol YUNXINDemoViewDelegate <NSObject>
- (void)demoViewDismiss;
@end
@interface YUNXINDemoView : UIView
@property (nonatomic, weak) id<YUNXINDemoViewDelegate> delegate;
@property (nonatomic, strong) NSString *requesterUid;
- (void)show;
- (void)dismiss;
- (void)updateToolBarWhenSameScreenAuthorityReq;
- (void)updateToolBarWhenMarkAuthorityReq;
@end
......
......@@ -12,13 +12,15 @@
@interface YUNXINDemoView ()
@property (nonatomic, strong) YUNXINSameScreenView *sameScrennView;
@property (nonatomic, strong) UIView *sameScrennView;
@property (nonatomic, assign) BOOL isAnimated;
@property (nonatomic, strong) UIView *toolBarView;
@property (nonatomic, strong) UIButton *cancelBtn;
@property (nonatomic, strong) UIButton *markBtn;
@property (nonatomic, strong) UIButton *callBackBtn;
@property (nonatomic, strong) UIButton *clearBtn;
@property (nonatomic, strong) UIButton *undoBtn;
@property (nonatomic, assign) BOOL isMark;
......@@ -30,6 +32,7 @@
{
self = [super initWithFrame:frame];
if (self) {
self .backgroundColor = [UIColor whiteColor];
self.isAnimated = NO;
[self setupUI];
}
......@@ -39,10 +42,9 @@
- (void)setupUI
{
self.sameScrennView = [[YUNXINSameScreenManager shareInstance] getSameScreenViewWithFrame:CGRectMake(0, kStatusBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT - kStatusBarHeight - 40 - kSafeButtomHeight) drawHexColor:@"#000000" isManager:YES];
[[YUNXINSameScreenManager shareInstance] updateSameScreenViewWithWebUrl:@"http://192.168.70.182/glw/private.html" miniFlag:@"1"];
[[YUNXINSameScreenManager shareInstance] updateSameScreenViewWithWebUrl:@"http://192.168.70.182/glw/005_teamwork/private.html?v=1" miniFlag:@"1"];
[self addSubview:self.sameScrennView];
[self addSubview:self.toolBarView];
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.markBtn]];
}
......@@ -67,12 +69,6 @@
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.markBtn, self.callBackBtn]];
}
- (void)updateToolBarWhenMarkAuthorityReq
{
[self.callBackBtn setTitle:@"收回标注" forState:UIControlStateNormal];
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.callBackBtn]];
}
- (void)show
{
......@@ -81,6 +77,7 @@
}
_isAnimated = YES;
_isMark = NO;
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.markBtn]];
[UIView animateWithDuration:0.2 animations:^{
CGRect mFrame = self.frame;
mFrame.origin.y -= mFrame.size.height;
......@@ -112,17 +109,20 @@
self.isMark = NO;
[[YUNXINSameScreenManager shareInstance] closeMark];
[self.cancelBtn setTitle:@"取消同屏" forState:UIControlStateNormal];
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.markBtn]];
}else {
[self dismiss];
[[YUNXINSameScreenManager shareInstance] sendDismissSameScreenViewNotification];
[[YUNXINSameScreenManager shareInstance] cancelSameScreencAction];
if ([_delegate respondsToSelector:@selector(demoViewDismiss)]) {
[_delegate demoViewDismiss];
}
}
}
- (void)callbackBtnTouched
{
if (self.isMark) {
[self updateToolBarViewWithshowArray:@[self.cancelBtn]];
}else {
if (!self.isMark) {
[[YUNXINSameScreenManager shareInstance] callbackTheRequsterSameScreenOperateAuthorityWithRequsterUid:self.requesterUid];
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.markBtn]];
}
}
......@@ -132,7 +132,17 @@
self.isMark = YES;
[[YUNXINSameScreenManager shareInstance] openMark];
[self.cancelBtn setTitle:@"取消标注" forState:UIControlStateNormal];
[self updateToolBarViewWithshowArray:@[self.cancelBtn]];
[self updateToolBarViewWithshowArray:@[self.cancelBtn, self.clearBtn, self.undoBtn]];
}
- (void)clearBtnTouched
{
[[YUNXINSameScreenManager shareInstance] clearCanvas];
}
- (void)undoBtnTouched
{
[[YUNXINSameScreenManager shareInstance] undoCanvas];
}
#pragma mark - setter/getter
......@@ -140,6 +150,7 @@
{
if (!_toolBarView) {
_toolBarView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - kSafeButtomHeight - 40, SCREEN_WIDTH, 40)];
_toolBarView.backgroundColor = [UIColor darkGrayColor];
}
return _toolBarView;
}
......@@ -168,4 +179,20 @@
return _callBackBtn;
}
- (UIButton *)clearBtn
{
if (!_clearBtn) {
_clearBtn = [CHUIFactory buttonWithTitle:@"清除" font:kFont(14) titleColor:[UIColor whiteColor] target:self action:@selector(clearBtnTouched)];
}
return _clearBtn;
}
- (UIButton *)undoBtn
{
if (!_undoBtn) {
_undoBtn = [CHUIFactory buttonWithTitle:@"撤销" font:kFont(14) titleColor:[UIColor whiteColor] target:self action:@selector(undoBtnTouched)];
}
return _undoBtn;
}
@end
......@@ -10,7 +10,7 @@
#import "CHUIFactory.h"
#import "YUNXINSameScreenManager.h"
#import "YUNXINDemoView.h"
@interface YUNXINDemoViewController ()<YUNXINSameScreenManagerDelegate>
@interface YUNXINDemoViewController ()<YUNXINSameScreenManagerDelegate, YUNXINDemoViewDelegate>
@property (nonatomic, strong) UILabel *noticeLabel;
@property (nonatomic, strong) UIButton *hangupBtn;
......@@ -24,10 +24,13 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
[[YUNXINSameScreenManager shareInstance] configCurrentSession:[NIMSession session:self.otherUid type:NIMSessionTypeP2P]];
[[YUNXINSameScreenManager shareInstance] addDelegate:self];
[self.view addSubview:self.noticeLabel];
[self.view addSubview:self.demoView];
[self.view addSubview:self.hangupBtn];
[self.view addSubview:self.sameScreenBtn];
}
#pragma mark - IBAction
......@@ -39,7 +42,10 @@
- (void)sameScreenBtnTouched
{
[_demoView show];
[[YUNXINSameScreenManager shareInstance] sendshowSameScreenViewNotification];
[[YUNXINSameScreenManager shareInstance] beginSameScreenAction];
_noticeLabel.hidden = YES;
_hangupBtn.hidden = YES;
_sameScreenBtn.hidden = YES;
}
......@@ -47,10 +53,14 @@
- (void)sameScreenCloseView
{
[_demoView dismiss];
_noticeLabel.hidden = NO;
_hangupBtn.hidden = NO;
_sameScreenBtn.hidden = NO;
}
- (void)sameScreenReceiveOperateReqWithUid:(NSString *)uid
{
_demoView.requesterUid = uid;
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:[NSString stringWithFormat:@"%@请求同屏操作", uid] preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *approve = [UIAlertAction actionWithTitle:@"同意" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[YUNXINSameScreenManager shareInstance] approveTheSameScreenOperateAuthorityWithRequseterUid:uid isApproved:YES];
......@@ -65,21 +75,22 @@
}
- (void)sameScreenReceiveMarkOperateReqWithUid:(NSString *)uid
- (void)sameScreenShowViewWithShowUrl:(NSString *)showUrl miniFlag:(NSString *)miniFlag
{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:[NSString stringWithFormat:@"%@请求同屏操作", uid] preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *approve = [UIAlertAction actionWithTitle:@"同意" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[YUNXINSameScreenManager shareInstance] approveTheSameScreenOperateAuthorityWithRequseterUid:uid isApproved:YES];
[self.demoView updateToolBarWhenMarkAuthorityReq];
}];
UIAlertAction *refuse = [UIAlertAction actionWithTitle:@"拒绝" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[[YUNXINSameScreenManager shareInstance] approveTheSameScreenOperateAuthorityWithRequseterUid:uid isApproved:NO];
}];
[alertController addAction:approve];
[alertController addAction:refuse];
[self presentViewController:alertController animated:YES completion:nil];
[[YUNXINSameScreenManager shareInstance] updateSameScreenViewWithWebUrl:showUrl miniFlag:miniFlag];
[_demoView show];
_noticeLabel.hidden = YES;
_hangupBtn.hidden = YES;
_sameScreenBtn.hidden = YES;
}
#pragma mark - YUNXINDemoViewDelegate
- (void)demoViewDismiss
{
_noticeLabel.hidden = NO;
_hangupBtn.hidden = NO;
_sameScreenBtn.hidden = NO;
}
#pragma mark - setter/getter
- (UILabel *)noticeLabel
......@@ -102,7 +113,7 @@
- (UIButton *)sameScreenBtn
{
if (!_sameScreenBtn) {
_sameScreenBtn = [CHUIFactory buttonWithTitle:@"同屏" font:kFont(16) titleColor:[UIColor blueColor] target:self action:@selector(sameScreenBtnTouched) frame:CGRectMake(40, 150, 60, 30)];
_sameScreenBtn = [CHUIFactory buttonWithTitle:@"同屏" font:kFont(16) titleColor:[UIColor blueColor] target:self action:@selector(sameScreenBtnTouched) frame:CGRectMake(100, 150, 60, 30)];
}
return _sameScreenBtn;
}
......@@ -112,6 +123,7 @@
{
if (!_demoView) {
_demoView = [[YUNXINDemoView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)];
_demoView.delegate = self;
}
return _demoView;
}
......
......@@ -10,6 +10,10 @@
#define YUNXINSameScreenDefine_h
#define SameScreenOpenReq @"8"
#define SameScreenOpenAnswer @"9"
#define SameScreenOperateGiveUp @"10"
#define SameScreenSyncSize @"0"
#define SameScreenOpenView @"1"
#define SameScreenCloseView @"2"
......
......@@ -28,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)undo;
- (void)updateMarkOperateStatus:(BOOL)couldMark;
- (void)destoryHeartBeat;
- (void)initHeartBeat;
@end
NS_ASSUME_NONNULL_END
......@@ -81,7 +81,7 @@ dispatch_async(dispatch_get_main_queue(), block);\
- (void)updateViewWithWebUrl:(NSString *)webUrl miniFlag:(NSString *)miniFlag
{
self.miniFlag = miniFlag;
if (webUrl.length > 0 && [webUrl isEqualToString:self.webUrl]) {
if (webUrl.length > 0 && ![webUrl isEqualToString:self.webUrl]) {
self.webUrl = webUrl;
[_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.webUrl]]];
}
......@@ -90,8 +90,9 @@ dispatch_async(dispatch_get_main_queue(), block);\
- (void)updateWebViewWidth:(CGFloat)width height:(CGFloat)height
{
CGFloat wbWidth = width < self.viewFrame.size.width ? width : self.viewFrame.size.width;
CGFloat wbHeight = height < self.viewFrame.size.height ? height : self.viewFrame.size.width;
CGFloat wbHeight = height < self.viewFrame.size.height ? height : self.viewFrame.size.height;
_webView.frame = CGRectMake((self.viewFrame.size.width - wbWidth) / 2, (self.viewFrame.size.height - wbHeight) / 2, wbWidth, wbHeight);
NSLog(@"=======>>>>>> webviewSize:Width:%f Height:%f", wbWidth, wbHeight);
_scrawlView.frame = _webView.frame;
}
......@@ -117,6 +118,7 @@ dispatch_async(dispatch_get_main_queue(), block);\
- (void)updateMarkOperateStatus:(BOOL)couldMark
{
_webView.userInteractionEnabled = couldMark;
_scrawlView.userInteractionEnabled = couldMark;
}
......@@ -129,6 +131,9 @@ dispatch_async(dispatch_get_main_queue(), block);\
_scrawlView.delegate = self;
[self addSubview:_scrawlView];
}
if (self.isManager) {
_scrawlView.userInteractionEnabled = YES;
}
_scrawlView.hidden = NO;
}
......@@ -231,7 +236,7 @@ dispatch_async(dispatch_get_main_queue(), block);\
webConfig.preferences.javaScriptCanOpenWindowsAutomatically = YES;
webConfig.userContentController = [WKUserContentController new];
_webView = [[WKWebView alloc] initWithFrame:self.viewFrame configuration:webConfig];
_webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.viewFrame.size.width, self.viewFrame.size.height) configuration:webConfig];
_webView.backgroundColor = [UIColor colorWithRed:246.0/255 green:246.0/255 blue:246.0/255 alpha:1.0];
_webView.scrollView.delegate = self;
_webView.UIDelegate = self;
......
......@@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
#import "YUNXINSameScreenView.h"
@class NIMSession;
NS_ASSUME_NONNULL_BEGIN
......@@ -25,29 +25,19 @@ NS_ASSUME_NONNULL_BEGIN
/// 在该回调内移除或隐藏同屏页面
- (void)sameScreenCloseView;
/// 收到对方申请同屏操作的请求,只有管理员能收到该回调
/// 收到非管理员申请同屏操作的请求(管理员使用)
/// @param uid 云信account
- (void)sameScreenReceiveOperateReqWithUid:(NSString *)uid;
/// 收到管理员关于本方同屏操作申请的回复
/// 收到管理员关于本方同屏操作申请的回复 (非管理员使用)
/// @param isApproved 是否被同意
- (void)sameScreenReceiveOperateReqResult:(BOOL)isApproved;
/// 收到管理员收回本方操作权限的通知
/// 收到管理员收回本方操作权限的通知 (非管理员使用)
- (void)sameScreenReceiveOperateCallBackNotification;
//标注相关
/// 收到对方申请标注操作的请求,只有管理员 能收到该回调
/// @param uid 云信account
- (void)sameScreenReceiveMarkOperateReqWithUid:(NSString *)uid;
/// 收到管理员关于本方标注操作申请的回复
/// @param isApproved 是否被同意
- (void)sameScreenReceiveMarkOperateReqResult:(BOOL)isApproved;
/// 收到管理员收回本方标注权限的通知
- (void)sameScreenReceiveMarkOperateCallBackNotification;
/// 收到非管理员主动放弃操作权限的通知 (管理员使用)
- (void)sameScreenReceiveOperateAbandonNotification;
@end
......@@ -75,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param frame 同屏页面大小
/// @param hexColorStr 标注颜色色值 默认"#000000"
/// @param isManager 是否是管理员
- (YUNXINSameScreenView *)getSameScreenViewWithFrame:(CGRect)frame drawHexColor:(NSString *)hexColorStr isManager:(BOOL)isManager;
- (UIView *)getSameScreenViewWithFrame:(CGRect)frame drawHexColor:(NSString *)hexColorStr isManager:(BOOL)isManager;
/// 更新同屏页面的内容
......@@ -83,14 +73,12 @@ NS_ASSUME_NONNULL_BEGIN
/// @param miniFlag H5的url在小程序中对应的flag
- (void)updateSameScreenViewWithWebUrl:(NSString *)webUrl miniFlag:(NSString *)miniFlag;
/// 同步同屏页面的尺寸大小
- (void)sameScreenSynchronizeViewSize;
/// 通知manager当前已经展示同屏页面
- (void)sendshowSameScreenViewNotification;
/// 开始同屏
- (void)beginSameScreenAction;
/// 通知manager当前已经移除同屏页面
- (void)sendDismissSameScreenViewNotification;
/// 取消同屏
- (void)cancelSameScreencAction;
/// 请求同屏操作权限(非管理员使用)
- (void)requestForSameScreenOperateAuthority;
......@@ -100,28 +88,24 @@ NS_ASSUME_NONNULL_BEGIN
/// @param isApproved 是否同意
- (void)approveTheSameScreenOperateAuthorityWithRequseterUid:(NSString *)requesterUid isApproved:(BOOL)isApproved;
/// 收回请求者的操作权限 (管理员使用)
/// 收回非管理员的操作权限 (管理员使用)
/// @param requesterUid 请求者云信account
- (void)callbackTheRequsterSameScreenOperateAuthorityWithRequsterUid:(NSString *)requesterUid;
/// 放弃当前操作权限 (非管理员使用)
- (void)giveUpTheSameScreenOperateAuthority;
/// 打开标注
- (void)openMark;
/// 关闭标注
- (void)closeMark;
/// /// 请求标注操作权限(非管理员使用)
- (void)requestForMarkOperateAuthority;
/// 发送审核标注权限结果 (管理员使用)
/// @param requesterUid 请求者云信account
/// @param isApproved 是否同意
- (void)approveTheMarkOperateAuthorityWithRequseterUid:(NSString *)requesterUid isApproved:(BOOL)isApproved;
/// 清除所有标记
- (void)clearCanvas;
/// 撤销上一步标记
- (void)undoCanvas;
/// 收回请求者标注权限 (管理员使用)
/// @param requesterUid 请求者云信account
- (void)callbackTheRequsterMarkOperateAuthorityWithRequsterUid:(NSString *)requesterUid;
/// 发送自定义通知消息
/// @param param param
......
......@@ -9,6 +9,7 @@
#import "YUNXINSameScreenManager.h"
#import <NIMSDK/NIMSDK.h>
#import "YUNXINSameScreenDefine.h"
#import "YUNXINSameScreenView.h"
@interface YUNXINSameScreenManager ()
......@@ -53,8 +54,9 @@
_session = session;
}
- (YUNXINSameScreenView *)getSameScreenViewWithFrame:(CGRect)frame drawHexColor:(NSString *)hexColorStr isManager:(BOOL)isManager
- (UIView *)getSameScreenViewWithFrame:(CGRect)frame drawHexColor:(NSString *)hexColorStr isManager:(BOOL)isManager
{
self.isManager = isManager;
self.viewSize = frame.size;
YUNXINSameScreenView *webView = [[YUNXINSameScreenView alloc] initWithFrame:frame drawHexColorStr:hexColorStr isManager:isManager];
self.webView = webView;
......@@ -98,6 +100,8 @@
[self dealWithOperateAnswer:param];
}else if ([action isEqualToString:SameScreenOperateCallback]) {
[self dealWithOperateCallBack:param];
}else if ([action isEqualToString:SameScreenOperateGiveUp]) {
}else if ([action isEqualToString:SameScreenOpenMark]) {
[_webView openMark];
}else if ([action isEqualToString:SameScreenCloseMark]) {
......@@ -108,27 +112,23 @@
[_webView clearCanvas];
}else if ([action isEqualToString:SameScreenUndoPreviousPath]) {
[_webView undo];
}else if ([action isEqualToString:SameScreenMarkReq]) {
[self dealWithMarkOperateReq:param];
}else if ([action isEqualToString:SameScreenMarkAnswer]) {
[self dealWithMarkOperateAnswer:param];
}else if ([action isEqualToString:SameScreenMarkCallback]) {
[self dealWithMarkOperateCallback:param];
}
}
- (void)sendshowSameScreenViewNotification
- (void)beginSameScreenAction
{
if (_webView) {
[self sameScreenSynchronizeViewSize];
[self sendCustomSysMsgWithParam:[_webView getShowDic] action:SameScreenOpenView];
[_webView initHeartBeat];
}
}
- (void)sendDismissSameScreenViewNotification
- (void)cancelSameScreencAction
{
[self sendCustomSysMsgWithParam:@{} action:SameScreenCloseView];
[_webView destoryHeartBeat];
}
- (void)requestForSameScreenOperateAuthority
......@@ -149,6 +149,12 @@
[self sendCustomSysMsgWithParam:@{@"uid": requesterUid} action:SameScreenOperateCallback];
}
- (void)giveUpTheSameScreenOperateAuthority
{
[_webView updateOperateStatus:NO];
[self sendCustomSysMsgWithParam:@{@"uid": [[[NIMSDK sharedSDK] loginManager] currentAccount]} action:SameScreenOperateGiveUp];
}
- (void)openMark
{
......@@ -162,6 +168,20 @@
[self sendCustomSysMsgWithParam:@{} action:SameScreenCloseMark];
}
- (void)clearCanvas
{
[_webView clearCanvas];
[self sendCustomSysMsgWithParam:@{} action:SameScreenClearCanvas];
}
- (void)undoCanvas
{
[_webView undo];
[self sendCustomSysMsgWithParam:@{} action:SameScreenUndoPreviousPath];
}
- (void)requestForMarkOperateAuthority
{
[self sendCustomSysMsgWithParam:@{@"uid":[[[NIMSDK sharedSDK] loginManager] currentAccount]} action:SameScreenMarkReq];
......@@ -184,12 +204,12 @@
#pragma mark - sendCustomSysMsg
- (void)sendCustomSysMsgWithParam:(NSDictionary *)param action:(NSString *)action
{
if (!param) {
if (action.length <= 0) {
return;
}
NSDictionary *dict = @{
@"id" : @(99),
@"content" : param,
@"content" : @{@"param": param, @"action":action},
};
NSData *data = [NSJSONSerialization dataWithJSONObject:dict
options:0
......@@ -240,36 +260,15 @@
}
}
- (void)dealWithMarkOperateReq:(NSDictionary *)param
- (void)dealWithOperateGiveUp
{
if (self.isManager) {
if ([_delegate respondsToSelector:@selector(sameScreenReceiveMarkOperateReqWithUid:)]) {
[_delegate sameScreenReceiveMarkOperateReqWithUid:param[@"uid"]];
if ([_delegate respondsToSelector:@selector(sameScreenReceiveOperateAbandonNotification)]) {
[_delegate sameScreenReceiveOperateAbandonNotification];
}
[_webView updateOperateStatus:YES];
}
}
- (void)dealWithMarkOperateAnswer:(NSDictionary *)param
{
NSString *uid = param[@"uid"];
if ([uid isEqualToString:[[[NIMSDK sharedSDK] loginManager] currentAccount]]) {
BOOL isApprove = [param[@"approve"] isEqualToString:@"1"];
if ([_delegate respondsToSelector:@selector(sameScreenReceiveMarkOperateReqResult:)]) {
[_delegate sameScreenReceiveMarkOperateReqResult:isApprove];
}
[_webView updateMarkOperateStatus:isApprove];
}
}
- (void)dealWithMarkOperateCallback:(NSDictionary *)param
{
NSString *uid = param[@"uid"];
if ([uid isEqualToString:[[[NIMSDK sharedSDK] loginManager] currentAccount]]) {
if ([_delegate respondsToSelector:@selector(sameScreenReceiveMarkOperateCallBackNotification)]) {
[_delegate sameScreenReceiveMarkOperateCallBackNotification];
}
[_webView updateMarkOperateStatus:NO];
}
}
@end
......@@ -145,7 +145,7 @@
[MBHUDTool showMessage:error.domain];
}else {
TraceS(@"云信登陆成功");
strongSelf.otherUid = @"hzyw77846977063892487";
strongSelf.otherUid = @"hzyw1361981094084900";
strongSelf.userLabel.text = @"用户3已经登陆";
[strongSelf updateViewWhenLoginSuccess];
}
......@@ -171,7 +171,9 @@
// vc.needCreate = YES;
// [self presentViewController:vc animated:YES completion:nil];
YUNXINDemoViewController *vc = [[YUNXINDemoViewController alloc] init];
vc.otherUid = @"hzyw77846977063892487";
vc.otherUid = @"hzyw79241709669453946";
// vc.otherUid = self.otherUid;
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:vc animated:YES completion:nil];
}
......
......@@ -38,6 +38,7 @@
#import "CHSameScreenAttachment.h"
#import "NTESCustomSysNotificationSender.h"
#import "CHPIngAttachment.h"
#import "YUNXINSameScreenManager.h"
NSString *NTESCustomNotificationCountChanged = @"NTESCustomNotificationCountChanged";
......@@ -210,6 +211,7 @@ NIMRTSManagerDelegate,NIMChatManagerDelegate,NIMBroadcastManagerDelegate, NIMSig
NSDictionary *contentDic = [dict objectForKey:NTESCustomContent];
TraceS(@"收到消息:%@",contentDic);
[[NSNotificationCenter defaultCenter] postNotificationName:MutiFaceSameScrrenNotification object:contentDic];
[[YUNXINSameScreenManager shareInstance] receiveCustomSysMsg:contentDic];
}
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册登录 后发表评论