半屏聊天的完善

This commit is contained in:
fengshuo
2022-06-06 17:52:49 +08:00
parent 7b097735c6
commit eab7fc6274
7 changed files with 92 additions and 25 deletions

View File

@@ -24,6 +24,24 @@
if ([rootViewController isKindOfClass:NSClassFromString(@"MMDrawerController")]) {
rootViewController = (UIViewController *)[rootViewController valueForKey:@"centerViewController"];
}
///
UIWindow * currentWindow;
for (int i = 0; i < [UIApplication sharedApplication].windows.count; i++) {
UIWindow * window = [[UIApplication sharedApplication].windows objectAtIndex:i];
if(window.tag == 1001) {
currentWindow = window;
break;
}
}
if (currentWindow) {
[currentWindow.rootViewController.navigationController popViewControllerAnimated:YES];
[currentWindow.superview removeFromSuperview];
currentWindow.rootViewController = nil;
currentWindow.windowLevel = -1;
currentWindow = nil;
}
UIViewController *currentVC = [self getCurrentVCFrom:rootViewController];
return currentVC;
}