Commit 5e4f7828 authored by 乔金柱's avatar 乔金柱

Merge branch 'houchaoxin/dev' into 'master'

Houchaoxin/dev

See merge request !29
parents 66bd1a3d 5cc58d15
...@@ -38,9 +38,13 @@ ...@@ -38,9 +38,13 @@
} }
- (void)showController:(UIViewController *)controller { - (void)showController:(UIViewController *)controller {
//如果之前已有controller
if (_controller) {
[(id<GMFloatWindowProtocol>)_controller destroyOtherController];
_controller = nil;
}
if (self.superview == nil) { if (self.superview == nil) {
[[UIApplication sharedApplication].keyWindow addSubview:self]; [[UIApplication sharedApplication].keyWindow addSubview:self];
// [[AppDelegate shareInstance].window addSubview:self];
} }
_controller = controller; _controller = controller;
[self addSubview:controller.view]; [self addSubview:controller.view];
......
...@@ -20,4 +20,8 @@ ...@@ -20,4 +20,8 @@
GMFloatWindow 由小窗口模式到全屏模式,会调用此方法 GMFloatWindow 由小窗口模式到全屏模式,会调用此方法
*/ */
- (void)showOtherViews; - (void)showOtherViews;
/// 销毁当前的VC(解决关闭直播间依旧有声音的bug)
- (void)destroyOtherController;
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment