|
|
@@ -269,89 +269,154 @@
|
|
|
//下载配置先处理
|
|
|
[boxDownloadFileManager shareInstance];
|
|
|
|
|
|
- if(_curPlayerVC){
|
|
|
- //[_curPlayerVC disconnectVideoServer];
|
|
|
-
|
|
|
- _curPlayerVC.isNeedRecyclResource = YES;
|
|
|
- [_curPlayerVC recyclResource];
|
|
|
-
|
|
|
- _curPlayerVC.liveStreamManager = nil;
|
|
|
- _curPlayerVC.commandChannelManager = nil;
|
|
|
- [_curPlayerVC.navigationController popViewControllerAnimated:NO];
|
|
|
- _curPlayerVC = nil;
|
|
|
- }
|
|
|
+ //获取NAS相关信息
|
|
|
+ [self getNASMsgFun];
|
|
|
|
|
|
- //每次进入
|
|
|
- PlayerViewController *playerRootVC = [[PlayerViewController alloc] init];
|
|
|
- if(self.isLoginAgainType){
|
|
|
- playerRootVC.isLoginAgainType = self.isLoginAgainType;
|
|
|
- }
|
|
|
- playerRootVC.isPwdVCShow = YES;
|
|
|
- _curPlayerVC = playerRootVC;
|
|
|
+ [self initMainTabbarFun];
|
|
|
|
|
|
-// BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:playerRootVC];
|
|
|
-// self.window.rootViewController = playerNav;
|
|
|
+ return;
|
|
|
|
|
|
- UIViewController *vc = [UIViewController new];
|
|
|
+// if(_curPlayerVC){
|
|
|
+// //[_curPlayerVC disconnectVideoServer];
|
|
|
+//
|
|
|
+// _curPlayerVC.isNeedRecyclResource = YES;
|
|
|
+// [_curPlayerVC recyclResource];
|
|
|
+//
|
|
|
+// _curPlayerVC.liveStreamManager = nil;
|
|
|
+// _curPlayerVC.commandChannelManager = nil;
|
|
|
+// [_curPlayerVC.navigationController popViewControllerAnimated:NO];
|
|
|
+// _curPlayerVC = nil;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //每次进入
|
|
|
+// PlayerViewController *playerRootVC = [[PlayerViewController alloc] init];
|
|
|
+// if(self.isLoginAgainType){
|
|
|
+// playerRootVC.isLoginAgainType = self.isLoginAgainType;
|
|
|
+// }
|
|
|
+// playerRootVC.isPwdVCShow = YES;
|
|
|
+// _curPlayerVC = playerRootVC;
|
|
|
+//
|
|
|
+//// BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:playerRootVC];
|
|
|
+//// self.window.rootViewController = playerNav;
|
|
|
+//
|
|
|
+// UIViewController *vc = [UIViewController new];
|
|
|
+//
|
|
|
+// BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:vc];
|
|
|
+// [playerNav pushViewController:playerRootVC animated:NO];
|
|
|
+// self.window.rootViewController = playerNav;
|
|
|
+//
|
|
|
+// _preRootPlayerNav = playerNav;
|
|
|
+//
|
|
|
+// self.isLoginAgainType = NO;
|
|
|
+//
|
|
|
+// __block BOOL isPrivacyMode = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode;
|
|
|
+//
|
|
|
+// KWeakSelf
|
|
|
+// if(!_isQRCodeType){
|
|
|
+//
|
|
|
+// if(isPrivacyMode)
|
|
|
+// {
|
|
|
+// [playerRootVC setShowImgAndVoiceTypeFun:NO];
|
|
|
+// [self showCalculatorVC];
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// [self HandleEnterNotPrivacyModeFun];
|
|
|
+//
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+// mainBlock(^{
|
|
|
+// [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
|
|
|
+// playerRootVC.isPwdVCShow = NO;
|
|
|
+// [playerRootVC setShowImgAndVoiceTypeFun:YES];
|
|
|
+// //[weakSelf shareAwakenAppBy:weakSelf.getShareStr];
|
|
|
+//
|
|
|
+// if(self->_session && self->_connectionOptions){
|
|
|
+// [self scene:self->_session openURLContexts:self->_connectionOptions.URLContexts];
|
|
|
+// }
|
|
|
+// });
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// //_isQRCodeType = NO;
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// if(isPrivacyMode)
|
|
|
+// {
|
|
|
+// [playerRootVC setShowImgAndVoiceTypeFun:NO];
|
|
|
+// [self showCalculatorVC];
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+// mainBlock(^{
|
|
|
+// playerRootVC.isPwdVCShow = NO;
|
|
|
+// [playerRootVC setShowImgAndVoiceTypeFun:YES];
|
|
|
+// });
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// _isQRCodeType = NO;
|
|
|
+//
|
|
|
+// //获取NAS相关信息
|
|
|
+// [self getNASMsgFun];
|
|
|
+}
|
|
|
|
|
|
- BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:vc];
|
|
|
- [playerNav pushViewController:playerRootVC animated:NO];
|
|
|
- self.window.rootViewController = playerNav;
|
|
|
-
|
|
|
- _preRootPlayerNav = playerNav;
|
|
|
-
|
|
|
- self.isLoginAgainType = NO;
|
|
|
-
|
|
|
- __block BOOL isPrivacyMode = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode;
|
|
|
+#pragma mark 1.4.1 tabbar
|
|
|
+- (void)initMainTabbarFun
|
|
|
+{
|
|
|
+ UITabBarController *tabBarController = [[UITabBarController alloc] init];
|
|
|
+
|
|
|
+ UIViewController *viewController1 = [[UIViewController alloc] init];
|
|
|
+ viewController1.title = @"First";
|
|
|
+ // ... 配置 viewController1 的其他属性 ...
|
|
|
+ // 设置标题
|
|
|
+ viewController1.tabBarItem.title = @"NAS";
|
|
|
+ // 设置选中状态的图片
|
|
|
+ viewController1.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_nas_H"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+ // 设置未选中状态的图片
|
|
|
+ viewController1.tabBarItem.image = [[UIImage imageNamed:@"tabbar_nas_N"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+
|
|
|
+
|
|
|
+ UIViewController *viewController2 = [[UIViewController alloc] init];
|
|
|
+ viewController2.title = @"Second";
|
|
|
+ // ... 配置 viewController2 的其他属性 ...
|
|
|
+ // 设置标题
|
|
|
+ viewController2.tabBarItem.title = @"云手机";
|
|
|
+ // 设置选中状态的图片
|
|
|
+ viewController2.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_phone_H"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+ // 设置未选中状态的图片
|
|
|
+ viewController2.tabBarItem.image = [[UIImage imageNamed:@"tabbar_phone_N"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+
|
|
|
+
|
|
|
+ UIViewController *viewController3 = [[UIViewController alloc] init];
|
|
|
+ viewController3.title = @"thrid";
|
|
|
+ // 设置标题
|
|
|
+ viewController3.tabBarItem.title = @"我的";
|
|
|
+ // 设置选中状态的图片
|
|
|
+ viewController3.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_my_H"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+ // 设置未选中状态的图片
|
|
|
+ viewController3.tabBarItem.image = [[UIImage imageNamed:@"tabbar_my_N"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
+
|
|
|
+ NSArray *viewControllers = @[viewController1, viewController2,viewController3]; // 添加更多视图控制器
|
|
|
+ tabBarController.viewControllers = viewControllers;
|
|
|
+
|
|
|
+// for (int i=0; i<viewControllers.count; i++) {
|
|
|
+// UITabBarItem * tabBarItem = [UITabBarItem new];
|
|
|
+// tabBarItem setim
|
|
|
+// }
|
|
|
|
|
|
- KWeakSelf
|
|
|
- if(!_isQRCodeType){
|
|
|
-
|
|
|
- if(isPrivacyMode)
|
|
|
- {
|
|
|
- [playerRootVC setShowImgAndVoiceTypeFun:NO];
|
|
|
- [self showCalculatorVC];
|
|
|
- }
|
|
|
- else{
|
|
|
- [self HandleEnterNotPrivacyModeFun];
|
|
|
-
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- mainBlock(^{
|
|
|
- [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
|
|
|
- playerRootVC.isPwdVCShow = NO;
|
|
|
- [playerRootVC setShowImgAndVoiceTypeFun:YES];
|
|
|
- //[weakSelf shareAwakenAppBy:weakSelf.getShareStr];
|
|
|
-
|
|
|
- if(self->_session && self->_connectionOptions){
|
|
|
- [self scene:self->_session openURLContexts:self->_connectionOptions.URLContexts];
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //_isQRCodeType = NO;
|
|
|
- }
|
|
|
- else{
|
|
|
- if(isPrivacyMode)
|
|
|
- {
|
|
|
- [playerRootVC setShowImgAndVoiceTypeFun:NO];
|
|
|
- [self showCalculatorVC];
|
|
|
- }
|
|
|
- else{
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- mainBlock(^{
|
|
|
- playerRootVC.isPwdVCShow = NO;
|
|
|
- [playerRootVC setShowImgAndVoiceTypeFun:YES];
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+// tabBarController.tabBar.barTintColor = [UIColor hwColor:@"#F6F8FA"]; // 设置标签栏背景色
|
|
|
+// tabBarController.tabBar.tintColor = [UIColor hwColor:@"#01B7EA"]; // 设置选中标签项的颜色
|
|
|
+ tabBarController.tabBar.backgroundColor = [UIColor whiteColor];
|
|
|
+
|
|
|
+ [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor hwColor:@"#F6F8FA"],NSForegroundColorAttributeName, [UIFont systemFontOfSize:12.0],NSFontAttributeName,nil] forState:UIControlStateNormal];
|
|
|
+
|
|
|
+ [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor hwColor:@"#01B7EA"],NSForegroundColorAttributeName, [UIFont systemFontOfSize:12.0],NSFontAttributeName,nil] forState:UIControlStateSelected];
|
|
|
|
|
|
- _isQRCodeType = NO;
|
|
|
+ // ... 设置其他属性 ...
|
|
|
|
|
|
- //获取NAS相关信息
|
|
|
- [self getNASMsgFun];
|
|
|
+ self.window.rootViewController = tabBarController;
|
|
|
+ [self.window makeKeyAndVisible];
|
|
|
}
|
|
|
|
|
|
#pragma mark 处理进来是非隐私模式的情况
|