This commit is contained in:
lianxiang 2018-09-08 09:53:51 +08:00
parent dc959b8ec0
commit fdee3e47f4
4 changed files with 23 additions and 17 deletions

View File

@ -37,7 +37,7 @@ static char overlayKey;
- (void)cnReset - (void)cnReset
{ {
[self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; [self setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[self.overlay removeFromSuperview]; [self.overlay removeFromSuperview];
self.overlay = nil; self.overlay = nil;
} }

View File

@ -34,12 +34,12 @@
} }
-(void)viewWillDisappear:(BOOL)animated{ -(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
[self.navigationController.navigationBar setBackgroundImage];
} }
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController.navigationBar setBackgroundImage];
} }

View File

@ -64,11 +64,8 @@
if (nkswitch.isOn) if (nkswitch.isOn)
NSLog(@"switchPressed ON"); NSLog(@"switchPressed ON");
else else
[self.manager disconnectSocket:self.client]; [[LXDanMuManager shareInstance] destory];
[self.manager disconnect]; [self destorySocket];
[self.client disconnect];
self.client = nil;
self.manager = nil;
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
NSLog(@"switchPressed OFF"); NSLog(@"switchPressed OFF");
} }
@ -189,8 +186,10 @@
} }
-(void)maskTimeEnd{ -(void)maskTimeEnd{
//
[[LXDanMuManager shareInstance] destory]; [[LXDanMuManager shareInstance] destory];
//socket
[self destorySocket];
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
} }
@ -199,8 +198,15 @@
} }
-(void)dealloc{ -(void)dealloc{
NSLog(@"dealloc"); NSLog(@"弹幕销毁 聊天关闭");
}
-(void)destorySocket{
[self.manager disconnectSocket:self.client];
[self.manager disconnect];
[self.client disconnect];
self.client = nil;
self.manager = nil;
} }
@end @end

View File

@ -26,7 +26,7 @@
#import "GiGaFlyingCommitInputView.h" #import "GiGaFlyingCommitInputView.h"
#import "GiGaFlingCommitVC.h" #import "GiGaFlingCommitVC.h"
#import "MaskTimeCircularProgressView.h" #import "MaskTimeCircularProgressView.h"
#import "UINavigationBar+Custom.h" //#import "UINavigationBar+Custom.h"
@interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate> @interface GiGaMaskTaskViewController ()<MaskCirCularProGressViewDelegate>
{ {
@ -150,7 +150,8 @@
#pragma mark - #pragma mark -
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
//
[self.navigationController.navigationBar setTranslucent:YES];
} }
@ -176,7 +177,7 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.automaticallyAdjustsScrollViewInsets = NO;
[self setUpNav]; [self setUpNav];
[self initUI]; [self initUI];
[self addNotify]; [self addNotify];
@ -331,7 +332,7 @@
#pragma mark #pragma mark
-(void)startMaskTime{ -(void)startMaskTime{
//[self createInputView]; // [self createInputView]; //
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate]; AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
if (delegate.isMasking) { if (delegate.isMasking) {
return; return;
@ -341,7 +342,7 @@
[self setBackGroundPlayingInfo];// [self setBackGroundPlayingInfo];//
// s // s
NSTimeInterval timeInterVal = 10; NSTimeInterval timeInterVal = 30;
[self.cicleProgressView startWith:timeInterVal]; [self.cicleProgressView startWith:timeInterVal];
// //
@ -500,7 +501,6 @@
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside]; [rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)];
} }
#pragma mark action #pragma mark action