From d2d5878e3e78ec456ba571fd8970eb8403089681 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期一, 22 六月 2020 09:43:26 +0800
Subject: [PATCH] 2020-06-22 1.更新
---
ESVideoPhoneSDKZigbee/ESVideoPhoneSDKDemo/ZigBee/ESvideoVideoIntercomViewController.m | 39 ++++++++++++++++++++++++++++++---------
1 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/ESVideoPhoneSDKZigbee/ESVideoPhoneSDKDemo/ZigBee/ESvideoVideoIntercomViewController.m b/ESVideoPhoneSDKZigbee/ESVideoPhoneSDKDemo/ZigBee/ESvideoVideoIntercomViewController.m
index d9e7ae3..7bdb545 100644
--- a/ESVideoPhoneSDKZigbee/ESVideoPhoneSDKDemo/ZigBee/ESvideoVideoIntercomViewController.m
+++ b/ESVideoPhoneSDKZigbee/ESVideoPhoneSDKDemo/ZigBee/ESvideoVideoIntercomViewController.m
@@ -80,6 +80,7 @@
NSString * refuseStr;
NSString * answerStr;
NSString * unlockSuccessfullyStr;
+ NSString * callingStr;
// int openDoorTimeout;
//鍏ㄥ眬鍙橀噺
SystemSoundID sound;
@@ -92,10 +93,11 @@
[self initTopBarView];
[self initCentetView];
[self initData];
- [self setAnswerBtnEnable:NO];
+ // [self setAnswerBtnEnable:NO];
[self initESVideo];
//寮�濮嬪弽鍛�
[self StartReverseCall];
+ [self ShowCalltimeBtn:callingStr];
// Do any additional setup after loading the view.
}
@@ -112,6 +114,7 @@
refuseStr = @"鎷掔粷";
answerStr = @"鎺ュ惉";
unlockSuccessfullyStr = @"寮�閿佹垚鍔�";
+ callingStr = @"鏉ョ數涓�...";
}else{
tipStr = @"Prompt";
okStr = @"OK";
@@ -120,6 +123,8 @@
refuseStr = @"Refuse";
answerStr = @"Answer";
unlockSuccessfullyStr = @"Unlock successfully";
+ callingStr = @"Incoming call";
+
}
}
@@ -151,8 +156,8 @@
-(void)backAction{
[self.navigationController popViewControllerAnimated:true];
-// [self dismissViewControllerAnimated:YES completion:NULL];
-
+ // [self dismissViewControllerAnimated:YES completion:NULL];
+
}
- (UIButton *)moreButton{
@@ -173,7 +178,7 @@
- (void)initCentetView {
[self.view addSubview:self.centerView];
- [self.centerView addSubview:self.collectButton];
+ // [self.centerView addSubview:self.collectButton];
[self.centerView addSubview:self.homeView];
[self.centerView addSubview:self.unlockView];
[self.unlockView addSubview:self.screenshotImgBtn];
@@ -425,18 +430,34 @@
return _calltimeBtn;
}
+
+
+
-(void)ShowTime:(int)nowTime {
if(_calltimeBtn.hidden) _calltimeBtn.hidden = NO;
NSString *timeStr = [self timeFormatted:nowTime];
- [self setCalltimeButtonText:timeStr];
+ [self setCalltimeButtonText:timeStr isTime:YES];
+}
+
+-(void)ShowCalltimeBtn:(NSString*) mesStr {
+ if(_calltimeBtn.hidden) _calltimeBtn.hidden = NO;
+
+ [self setCalltimeButtonText:mesStr isTime:NO];
+
+
}
/*
鏍规嵁鏂囧瓧璋冩暣鎸夐挳瀹�
*/
--(void)setCalltimeButtonText:(NSString*) mesStr {
+-(void)setCalltimeButtonText:(NSString*) mesStr isTime:(BOOL)isTime
+{
[_calltimeBtn setTitle:mesStr forState:UIControlStateNormal];
- _calltimeBtn.frame = CGRectMake(0, 0, 100, 30);
+ if(isTime){
+ _calltimeBtn.frame = CGRectMake(0, 0, 80, 30);
+ }else{
+ _calltimeBtn.frame = CGRectMake(0, 0, 115, 30);
+ }
_calltimeBtn.center = CGPointMake(APP_SCREEN_WIDTH/2, 397);
}
@@ -663,8 +684,8 @@
[alertController addAction:[UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleCancel handler:nil]];
[self presentViewController:alertController animated:YES completion:nil];
-// UIAlertView *alertView1 = [[UIAlertView alloc] initWithTitle:tipStr message:mes delegate:self cancelButtonTitle:okStr otherButtonTitles:nil, nil];
-// [alertView1 show];
+ // UIAlertView *alertView1 = [[UIAlertView alloc] initWithTitle:tipStr message:mes delegate:self cancelButtonTitle:okStr otherButtonTitles:nil, nil];
+ // [alertView1 show];
}
--
Gitblit v1.8.0