MySetViewController.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. //
  2. // MySetViewController.m
  3. // 双子星云手机
  4. //
  5. // Created by APPLE on 2023/8/17.
  6. //
  7. #import "MySetViewController.h"
  8. #import <SDWebImage.h>
  9. #import <Masonry.h>
  10. #import "HelpDownScrollView.h"
  11. #import "MineViewCell.h"
  12. #import "ChangeLogoViewController.h"
  13. #import "HidenMaskSetViewController.h"
  14. #import "CustomerWebViewController.h"
  15. #import "AboutViewController.h"
  16. #import "iPhone.h"
  17. #import "CloudPhoneAPI.h"
  18. #import "ComontAlretViewController.h"
  19. #import "ModifyPWDFirstViewController.h"
  20. #import "TipsQRCodeForChangeDeviceViewController.h"
  21. #import "connectDeviceManager.h"
  22. #import "mySetHeadView.h"
  23. #import "uploadImageOrVideoViewController.h"
  24. #import "TZImagePickerController.h"
  25. #import "uploadFileRecordViewController.h"
  26. #import "privacyModeViewController.h"
  27. #import "TvStatusModel.h"
  28. @interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,ComontAlretViewControllerDelegate>
  29. {
  30. UILabel *phoneLabel;
  31. UILabel *vipTypeTipsLabel;
  32. UIButton *tvP2PBtn;
  33. }
  34. @property (nonatomic, strong, nullable) UITableView *tableView;
  35. @end
  36. @implementation MySetViewController
  37. - (void)viewDidLoad {
  38. [super viewDidLoad];
  39. // Do any additional setup after loading the view.
  40. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getCouldPhoneTvStatusFun:) name:getCouldPhoneTvStatusNotification object:nil];
  41. [self drawAnyView];
  42. }
  43. - (void)viewWillAppear:(BOOL)animated
  44. {
  45. [super viewWillAppear:animated];
  46. if(_getTvStatus){
  47. _getTvStatus();
  48. }
  49. }
  50. - (void)drawAnyView{
  51. [self.view setBackgroundColor:HWF5F7FAColor];
  52. [self.toolBar setHidden:YES];
  53. [self.navigationBar setHidden:YES];
  54. [self.navBarBGView setHidden:NO];
  55. [self.titleLabel setText:NSLocalizedString(@"more_set",nil)];
  56. [self.view addSubview:self.tableView];
  57. [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  58. make.left.mas_equalTo(0);
  59. make.right.mas_equalTo(0);
  60. make.bottom.mas_equalTo(0);
  61. make.top.equalTo(self.navBarBGView.mas_bottom).offset(5.f);
  62. }];
  63. }
  64. - (UIView *)tableHeadView{
  65. UIView *bgView = [[UIView alloc] initWithFrame:(CGRectMake(0, 0, SCREEN_W, 108.f + 15))];
  66. [bgView setBackgroundColor:[UIColor clearColor]];
  67. mySetHeadView *headView = [[mySetHeadView alloc] init];
  68. [bgView addSubview:headView];
  69. headView.layer.cornerRadius = 8;
  70. headView.layer.masksToBounds = YES;
  71. [headView mas_makeConstraints:^(MASConstraintMaker *make) {
  72. make.left.mas_equalTo(15);
  73. make.right.mas_equalTo(-15);
  74. make.top.mas_equalTo(0);
  75. make.bottom.mas_equalTo(-15);
  76. }];
  77. #pragma mark 上传文件相关处理
  78. headView.didClickBut = ^(NSInteger tag) {
  79. if(tag ==2 || tag ==3){
  80. if(self->_getBaseInfo){
  81. self->_getBaseInfo();
  82. }
  83. uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
  84. if(tag ==2){
  85. vc.isPhotoType = YES;
  86. }
  87. else{
  88. vc.isPhotoType = NO;
  89. }
  90. [self.navigationController pushViewController:vc animated:YES];
  91. }
  92. else if(tag == 1){
  93. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  94. vc.isNotUploadingType = YES;
  95. [self.navigationController pushViewController:vc animated:YES];
  96. }
  97. };
  98. return bgView;
  99. }
  100. - (UIView *)tableFoorView{
  101. UIView *bgView = [[UIView alloc] initWithFrame:(CGRectMake(0, 0, SCREEN_W, 68.f))];
  102. [bgView setBackgroundColor:[UIColor clearColor]];
  103. tvP2PBtn = [[UIButton alloc] initWithFrame:(CGRectMake(15, 20, SCREEN_W - 2*15.f, 48.f))];
  104. [tvP2PBtn setBackgroundColor:HWFFFFFFColor];
  105. [tvP2PBtn setTitle:NSLocalizedString(@"my_set_no_TV_p2p",nil) forState:(UIControlStateNormal)];
  106. [tvP2PBtn setTitle:NSLocalizedString(@"my_set_no_close_TV_p2p",nil) forState:(UIControlStateSelected)];
  107. [tvP2PBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
  108. [tvP2PBtn.titleLabel setFont:[UIFont boldSystemFontOfSize:14.f]];
  109. [tvP2PBtn addTarget:self
  110. action:@selector(tvP2PBtnPressed)
  111. forControlEvents:(UIControlEventTouchUpInside)];
  112. [tvP2PBtn.layer setCornerRadius:8.f];
  113. [bgView addSubview:tvP2PBtn];
  114. return bgView;
  115. }
  116. #pragma mark 点击投屏
  117. - (void)tvP2PBtnPressed{
  118. if(tvP2PBtn.selected)
  119. {
  120. [self showCloseTVP2PFun];
  121. }
  122. else{
  123. [self showTVP2PFun];
  124. }
  125. }
  126. #pragma mark 显示投屏提示语
  127. - (void)showTVP2PFun{
  128. /*弹窗提示TV投屏*/
  129. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_TVP2P_Open_title",nil)
  130. msg:NSLocalizedString(@"my_set_TVP2P_Open_Subtitle",nil)
  131. imageStr:nil
  132. cancelTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil)
  133. okTitle:nil isOkBtnHighlight:NO
  134. didClickOk:^{
  135. HLog(@"111");
  136. } didClickCancel:^{
  137. //HLog(@"2222");
  138. [self gotoSetTVP2PFun];
  139. }];
  140. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  141. [self presentViewController:nextVC animated:YES completion:^{
  142. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  143. }];
  144. }
  145. #pragma mark 确认开始TV投屏
  146. -(void)gotoSetTVP2PFun
  147. {
  148. if(_needToTVP2P){
  149. _needToTVP2P();
  150. }
  151. [self.navigationController popViewControllerAnimated:YES];
  152. }
  153. #pragma mark 显示关闭投屏提示语
  154. - (void)showCloseTVP2PFun{
  155. /*弹窗提示TV投屏*/
  156. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_close_TV_p2p_tip",nil)
  157. msg:nil
  158. imageStr:nil
  159. cancelTitle:NSLocalizedString(@"other_cancel",nil)
  160. okTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil) isOkBtnHighlight:YES
  161. didClickOk:^{
  162. [self gotoCloseTVP2PFun];
  163. } didClickCancel:^{
  164. //HLog(@"2222");
  165. }];
  166. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  167. [self presentViewController:nextVC animated:YES completion:^{
  168. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  169. }];
  170. }
  171. #pragma mark 确认开始TV投屏
  172. -(void)gotoCloseTVP2PFun
  173. {
  174. if(_closeTVP2P){
  175. _closeTVP2P();
  176. tvP2PBtn.selected = NO;
  177. }
  178. tvP2PBtn.userInteractionEnabled = NO;
  179. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  180. self->tvP2PBtn.userInteractionEnabled = YES;
  181. });
  182. }
  183. - (void)helpDownScrollViewBePressed:(nonnull id)sender withIndex:(NSInteger)index {
  184. HLog(@"\n----点击了第个%ld按钮----",index);
  185. if (index == 0){
  186. ChangeLogoViewController *nextVC = [[ChangeLogoViewController alloc] init];
  187. [self.navigationController pushViewController:nextVC animated:YES];
  188. }else if (index == 1){/**/
  189. HidenMaskSetViewController *nextVC = [[HidenMaskSetViewController alloc] init];
  190. [self.navigationController pushViewController:nextVC animated:YES];
  191. }
  192. }
  193. #pragma mark - 懒加载
  194. - (UITableView *)tableView{
  195. if (!_tableView) {
  196. _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H - TABBARHEIGHT) style:UITableViewStylePlain];
  197. _tableView.delegate = self;
  198. _tableView.dataSource = self;
  199. _tableView.showsVerticalScrollIndicator = NO;
  200. _tableView.showsHorizontalScrollIndicator = NO;
  201. // _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
  202. [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
  203. [_tableView setSeparatorColor:[UIColor clearColor]];
  204. [_tableView setBackgroundColor:[UIColor clearColor]];
  205. [_tableView setTableFooterView:[UIView new]];
  206. [_tableView setBounces:YES];
  207. if (@available(iOS 15.0, *)) {
  208. _tableView.sectionHeaderTopPadding = 0;
  209. }
  210. [_tableView setTableFooterView:[self tableFoorView]];
  211. [_tableView setTableHeaderView:[self tableHeadView]];
  212. }
  213. return _tableView;
  214. }
  215. #pragma mark - 列表委托
  216. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
  217. return 1;
  218. }
  219. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  220. return 6;
  221. //return 5;//去掉更换icon
  222. }
  223. - (MineViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  224. NSInteger row = indexPath.row;
  225. static NSString *identifier = @"MineViewCell";
  226. MineViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
  227. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  228. if (!cell){
  229. cell = [[MineViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
  230. [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
  231. [cell setBackgroundColor:[UIColor clearColor]];
  232. [cell setAccessoryType:(UITableViewCellAccessoryNone)];
  233. }
  234. [cell.bgViewLayer removeFromSuperlayer];
  235. [cell.titleLabel2 setHidden:YES];
  236. [cell.rightImage setHidden:NO];
  237. [cell.lineView setHidden:NO];
  238. [cell.maskSwitch setHidden:YES];
  239. if (row == 0){
  240. [cell.titleLabel setText:NSLocalizedString(@"my_set_Privacy_Model",nil)];
  241. [cell.mImageView setImage:[UIImage imageNamed:@"icon_Privacy_model"]];
  242. // [cell.titleLabel setText:NSLocalizedString(@"my_set_no_modify_pwd",nil)];
  243. // [cell.mImageView setImage:[UIImage imageNamed:@"mdoify_pwd"]];
  244. /*上圆角*/
  245. //设置部分圆角 贝塞尔曲线
  246. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W-30 , 60)
  247. byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight
  248. cornerRadii:CGSizeMake(8, 8)];
  249. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  250. maskLayer.frame = cell.cellBgView.bounds;
  251. maskLayer.path = maskPath.CGPath;
  252. cell.bgViewLayer = maskLayer;
  253. cell.cellBgView.layer.mask = cell.bgViewLayer;
  254. // }else if (row == 1){
  255. // [cell.titleLabel setText:NSLocalizedString(@"my_set_no_change_logo",nil)];
  256. // [cell.mImageView setImage:[UIImage imageNamed:@"icon_change_logo"]];
  257. // // }else if (row == 2){
  258. // // [cell.titleLabel setText:NSLocalizedString(@"mask_view_hiden_set_hiden",nil)];
  259. // // [cell.mImageView setImage:[UIImage imageNamed:@"icon-jincheng"]];
  260. // // }else if (row == 3){
  261. // }else if (row == 1){
  262. // [cell.titleLabel setText:NSLocalizedString(@"my_set_no_fanzhuan_exit",nil)];
  263. // [cell.mImageView setImage:[UIImage imageNamed:@"fanzhuan"]];
  264. // [cell.rightImage setHidden:YES];
  265. // [cell.maskSwitch setHidden:NO];
  266. //}else if (row == 4){/*版本信息*/
  267. }else if (row == 1){/*版本信息*/
  268. [cell.titleLabel setText:NSLocalizedString(@"my_set_no_check_update",nil)];
  269. [cell.mImageView setImage:[UIImage imageNamed:@"app_update"]];
  270. [cell.titleLabel2 setText:[iPhone appVersion]];
  271. [cell.titleLabel2 setHidden:NO];
  272. //}else if (row == 5){/*更换设备*/
  273. }else if (row == 2){/*更换设备*/
  274. [cell.titleLabel setText:NSLocalizedString(@"my_set_no_change_phone",nil)];
  275. [cell.mImageView setImage:[UIImage imageNamed:@"icon_change_ohone"]];
  276. //}else if (row == 6){
  277. }else if (row == 3){/*常见问题*/
  278. [cell.titleLabel setText:NSLocalizedString(@"my_set_no_common_problem",nil)];
  279. [cell.mImageView setImage:[UIImage imageNamed:@"icon_common_problem"]];
  280. }else if (row == 4){/*回复出厂*/
  281. [cell.titleLabel setText:NSLocalizedString(@"my_set_no_Restore_Factory",nil)];
  282. [cell.mImageView setImage:[UIImage imageNamed:@"icon_Restore_Factory"]];
  283. }else if (row == 5){/*重启空间*/
  284. [cell.titleLabel setText:NSLocalizedString(@"my_set_no_restart_phone",nil)];
  285. [cell.mImageView setImage:[UIImage imageNamed:@"icon-gengxin"]];
  286. /*下圆角*/
  287. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W-30 , 60)
  288. byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight
  289. cornerRadii:CGSizeMake(8, 8)];
  290. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  291. maskLayer.frame = cell.cellBgView.bounds;
  292. maskLayer.path = maskPath.CGPath;
  293. cell.bgViewLayer = maskLayer;
  294. cell.cellBgView.layer.mask = cell.bgViewLayer;
  295. [cell.lineView setHidden:YES];
  296. }
  297. return cell;
  298. }
  299. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  300. return 60;
  301. }
  302. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  303. [tableView deselectRowAtIndexPath:indexPath animated:YES];
  304. NSInteger row = indexPath.row;
  305. if (0 == row){
  306. privacyModeViewController *nextVC = [[privacyModeViewController alloc] init];
  307. [self.navigationController pushViewController:nextVC animated:YES];
  308. /*修改密码*/
  309. // ModifyPWDFirstViewController *nextVC = [[ModifyPWDFirstViewController alloc] init];
  310. // [self.navigationController pushViewController:nextVC animated:YES];
  311. // }else if (1 == row){
  312. // /*更换图标*/
  313. // ChangeLogoViewController *nextVC = [[ChangeLogoViewController alloc] init];
  314. // [self.navigationController pushViewController:nextVC animated:YES];
  315. // }else if (1 == row){/*进城隐藏*/
  316. // HidenMaskSetViewController *nextVC = [[HidenMaskSetViewController alloc] init];
  317. // [self.navigationController pushViewController:nextVC animated:YES];
  318. // }else if (3 == row){/*设备翻转*/
  319. // ;
  320. }
  321. //else if (4 == row){/*版本信息*/
  322. else if (1 == row){/*版本信息*/
  323. AboutViewController *vc = [[AboutViewController alloc] init];
  324. vc.getSysInfo = ^{
  325. if(self->_getSysInfo){
  326. self->_getSysInfo();
  327. }
  328. };
  329. [self.navigationController pushViewController:vc animated:YES];
  330. //}else if (5 == row){/*更换设备*/
  331. }else if (2 == row){/*更换设备*/
  332. TipsQRCodeForChangeDeviceViewController *vc = [[TipsQRCodeForChangeDeviceViewController alloc] init];
  333. [self.navigationController pushViewController:vc animated:YES];
  334. }else if (3 == row){/*常见问题*/
  335. CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
  336. vc.titleStr = NSLocalizedString(@"my_set_no_common_problem",nil);
  337. NSString *url = @"https://cliys.armclouding.com/h5/microserviceUserH5/commonProblem/questionIndex.html";
  338. vc.webUrl = url;
  339. [self.navigationController pushViewController:vc animated:YES];
  340. }else if (4 == row){/*恢复出厂*/
  341. [self RestoreFactoryAleartFun];
  342. }else if (5 == row){/*重启空间*/
  343. /*弹窗提示重启*/
  344. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_restart_phone_tips",nil)
  345. msg:nil
  346. imageStr:nil
  347. cancelTitle:NSLocalizedString(@"other_cancel",nil)
  348. okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil) isOkBtnHighlight:NO
  349. didClickOk:^{
  350. } didClickCancel:^{
  351. }];
  352. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  353. nextVC.delegate = self;
  354. [self presentViewController:nextVC animated:YES completion:^{
  355. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  356. }];
  357. }
  358. }
  359. - (void)CommonAlertokBtnClickPressed{
  360. // /*重启云手机*/
  361. // 通过指令通道发送 {"type":"reboot"}
  362. if(_needToReboot){
  363. _needToReboot();
  364. }
  365. //提示语
  366. [[iToast makeText:NSLocalizedString(@"player_link_rebooting_Tips",nil)] show];
  367. }
  368. #pragma mark 点击恢复出厂
  369. - (void)RestoreFactoryAleartFun
  370. {
  371. KWeakSelf
  372. /*弹窗提示恢复出厂*/
  373. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_tips",nil)
  374. msg:NSLocalizedString(@"my_set_no_Restore_Factory_msg",nil)
  375. imageStr:@"icon_Restore_Factory_big"
  376. cancelTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil)
  377. okTitle:NSLocalizedString(@"other_cancel",nil) isOkBtnHighlight:YES
  378. didClickOk:^{
  379. } didClickCancel:^{
  380. //点击确定
  381. [weakSelf gotoResetFun];
  382. }];
  383. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  384. [self presentViewController:nextVC animated:YES completion:^{
  385. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  386. }];
  387. }
  388. #pragma mark 点击了恢复出厂
  389. - (void)gotoResetFun
  390. {
  391. if(_needToReset){
  392. _needToReset();
  393. }
  394. [self RestoreFactoryingFun];
  395. }
  396. #pragma mark 恢复出厂中
  397. - (void)RestoreFactoryingFun
  398. {
  399. KWeakSelf
  400. /*弹窗提示恢复出厂*/
  401. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factorying_tips",nil)
  402. msg:NSLocalizedString(@"my_set_no_Restore_Factorying_msg",nil)
  403. imageStr:nil
  404. cancelTitle:NSLocalizedString(@"my_set_no_Restore_Factorying",nil)
  405. okTitle:nil
  406. isOkBtnHighlight:NO
  407. didClickOk:^{
  408. [weakSelf RestoreFactoryCompleteFun];
  409. } didClickCancel:^{
  410. }];
  411. [nextVC setButtonCountdownFun:180];//90
  412. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  413. [self presentViewController:nextVC animated:YES completion:^{
  414. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  415. }];
  416. }
  417. #pragma mark 恢复出厂倒计时结束
  418. - (void)RestoreFactoryCompleteFun
  419. {
  420. KWeakSelf
  421. //瑞云发起重连
  422. NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
  423. if(snStr){
  424. [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(bool didSuc) {
  425. if(didSuc){
  426. if(self->_needToResetAndOk){
  427. self->_needToResetAndOk();
  428. }
  429. }
  430. else{
  431. [weakSelf RestoreFactoryCompleteFun];
  432. return;
  433. }
  434. }];
  435. }
  436. /*弹窗提示恢复出厂*/
  437. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_ok_tips",nil)
  438. msg:NSLocalizedString(@"my_set_no_Restore_Factory_ok_msg",nil)
  439. imageStr:nil
  440. cancelTitle:NSLocalizedString(@"my_set_no_Restore_FactoryOK",nil)
  441. okTitle:nil
  442. isOkBtnHighlight:NO
  443. didClickOk:^{
  444. } didClickCancel:^{
  445. [weakSelf.navigationController popViewControllerAnimated:YES];
  446. }];
  447. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  448. [self presentViewController:nextVC animated:YES completion:^{
  449. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  450. }];
  451. }
  452. - (void)getCouldPhoneTvStatusFun:(NSNotification*)not
  453. {
  454. TvStatusModel *model = [not object];
  455. //HLog(@"%@",baseInfoModel);
  456. if(!model || ![model isKindOfClass:[TvStatusModel class]]){
  457. return;
  458. }
  459. if([model.msg containsString:@"PushStreamBActivity"]){
  460. tvP2PBtn.selected = YES;
  461. }
  462. else{
  463. tvP2PBtn.selected = NO;
  464. }
  465. }
  466. @end