WDKChatRoomViewController *roomVC = [[WDKChatRoomViewController alloc] init];
roomVC.titleStr = [group showTitle];
roomVC.userId = caseEventModel.child_group_id;
roomVC.chidGroupDic = infoDic;
roomVC.group = group;
roomVC.view.backgroundColor = [UIColor clearColor];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:roomVC];
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) {
nav.modalPresentationStyle=UIModalPresentationOverCurrentContext;
}else{
nav.modalPresentationStyle=UIModalPresentationCurrentContext;
}
[self.navigationController presentViewController:nav animated:YES completion: nil];
关键的代码是:
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) {
nav.modalPresentationStyle=UIModalPresentationOverCurrentContext;
}else{
nav.modalPresentationStyle=UIModalPresentationCurrentContext;
}