| 
					
				 | 
			
			
				@@ -24,18 +24,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @interface ClassTitleView () 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//@property (nonatomic, strong) UILabel *timeLable; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, strong) NSTimer *timeTimer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, strong) NSMutableArray *buttonArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, strong) NSArray *buttonImageArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, strong) NSArray *buttonHighlightedImageArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, strong) NSArray *buttonCloseImageArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@property (nonatomic, assign) NSInteger duration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @property (nonatomic, assign) NSInteger hiddenDuration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-@property (nonatomic, assign) BOOL isCountDown; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @implementation ClassTitleView 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -48,8 +44,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         self.backgroundColor = [HexRGB(0x141414) colorWithAlphaComponent:0.74]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [self.buttonArray addObjectsFromArray:@[self.switchLineBtn,self.switchCameraBtn,self.microphoneBtn,self.cameraBtn,self.hangupBtn]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [self addSubviews]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        self.isCountDown = NO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        self.duration = [ClassroomService sharedService].currentRoom.surplusTime; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [self refreshTitleView]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [self.timeTimer setFireDate:[NSDate distantPast]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -58,13 +52,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - (void)addSubviews { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.signalImageView]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    [self addSubview:self.timeLable]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.switchLineBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.switchCameraBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.microphoneBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.cameraBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    [self addSubview:self.onShowLabel]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    [self addSubview:self.guideBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self addSubview:self.hangupBtn]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     CGFloat topOffset = (self.bounds.size.height - TButtonWidth) / 2.0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -74,12 +66,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         make.width.mas_equalTo(TSignalImageViewWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         make.height.mas_equalTo(TSignalImageViewWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    [self.timeLable mas_makeConstraints:^(MASConstraintMaker *make) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.left.equalTo(self.signalImageView.mas_right).offset(20); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.centerY.equalTo(self.mas_centerY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.width.equalTo(@TTimeLableWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.height.equalTo(@TTimeLableHeight); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 切换线路 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self.switchLineBtn mas_makeConstraints:^(MASConstraintMaker *make) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -110,14 +96,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         make.height.mas_equalTo(TButtonWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         make.top.mas_equalTo(self.mas_top).offset(topOffset); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 演示label 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    [self.onShowLabel mas_makeConstraints:^(MASConstraintMaker *make) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.left.mas_equalTo(self.cameraBtn.mas_right).offset(TButtonSpace * 2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.width.mas_equalTo(120); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.height.mas_equalTo(TButtonWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        make.top.mas_equalTo(self.mas_top).offset(topOffset); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 声部示意图 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    [self.guideBtn mas_makeConstraints:^(MASConstraintMaker *make) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        make.left.mas_equalTo(self.cameraBtn.mas_right).offset(TButtonSpace); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        make.width.mas_equalTo(80); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        make.height.mas_equalTo(TButtonWidth); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        make.top.mas_equalTo(self.mas_top).offset(topOffset); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 退出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     [self.hangupBtn mas_makeConstraints:^(MASConstraintMaker *make) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -160,12 +145,13 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-- (void)setDuration:(NSInteger)duration { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    _duration = duration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (_duration < 300 && self.isCountDown == NO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        self.isCountDown = YES; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        self.timeLable.textColor = HexRGB(0x2DC7AA); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        [self.timeLable.layer addAnimation:[self opacityForeverAnimation:0.5f] forKey:nil]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+- (void)setHasGuideImage:(BOOL)hasGuideImage { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    _hasGuideImage = hasGuideImage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (hasGuideImage) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        self.guideBtn.hidden = NO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        self.guideBtn.hidden = YES; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -182,7 +168,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    self.timeLable.text = [self formatJoinTime]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (self.delegate && [self.delegate respondsToSelector:@selector(refreshClassStatus)]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [self.delegate refreshClassStatus]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -246,7 +231,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - (void)setDefaultButtons { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    self.buttonImageArray = @[@"line_switch",@"camera_switch", @"userMic_on", @"userCamera_on",@"class_hangUp"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    self.buttonImageArray = @[@"line_switch",@"camera_switch", @"userMic_on", @"userCamera_on", @"class_hangUp"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     self.buttonCloseImageArray = @[@"line_switch",@"camera_switch", @"userMic_off", @"userCamera_off", @"class_hangUp"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     for(int i = 0; i < self.buttonArray.count; i++) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -257,21 +242,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-- (NSString *)formatJoinTime { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (self.duration <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return @"00:00:00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    NSInteger durationInteger = self.duration--; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    NSInteger durationS = durationInteger % 60; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    NSInteger durationM = ((durationInteger - durationS) / 60) % 60; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    NSInteger durationH = (durationInteger - durationS - 60 * durationM) / 3600; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    NSMutableArray * durationArr = [NSMutableArray new]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    [durationArr addObject:[NSString stringWithFormat:@"%02ld", durationH]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    [durationArr addObject:[NSString stringWithFormat:@"%02ld", durationM]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    [durationArr addObject:[NSString stringWithFormat:@"%02ld", durationS]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    return [durationArr componentsJoinedByString:@":"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - (UIImageView *)signalImageView { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(!_signalImageView) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _signalImageView = [[UIImageView alloc] init]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -280,15 +250,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return _signalImageView; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//- (UILabel *)timeLable { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    if(!_timeLable) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _timeLable = [[UILabel alloc] init]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _timeLable.font = [UIFont systemFontOfSize:14]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _timeLable.textColor = [UIColor colorWithHexString:@"FFFFFF" alpha:1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    return _timeLable; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - (UIButton *)switchLineBtn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (!_switchLineBtn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _switchLineBtn = [[UIButton alloc] init]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -333,15 +294,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return _cameraBtn; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//- (UILabel *)onShowLabel { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    if (!_onShowLabel) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _onShowLabel = [[UILabel alloc] init]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _onShowLabel.textColor = HexRGB(0xf9f9f9); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _onShowLabel.font = [UIFont systemFontOfSize:14.0f]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//        _onShowLabel.text = @"您已进入演示模式"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//    return _onShowLabel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+- (UIButton *)guideBtn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!_guideBtn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn = [[UIButton alloc] init]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn.enabled = YES; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn.tag = ClassTitleViewActionTagGuide; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn.backgroundColor = THEMECOLOR; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        [_guideBtn setTitle:@"关闭示意图" forState:UIControlStateNormal]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        [_guideBtn setTitle:@"开启示意图" forState:UIControlStateSelected]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn.layer.cornerRadius = 12.0f; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _guideBtn.titleLabel.font = [UIFont systemFontOfSize:12.0f]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        [_guideBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return _guideBtn; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - (UIButton *)hangupBtn { 
			 |