1.在ios7以前:
UIViewController *VC = [[UIViewController alloc]init];
self.modalPresentationStyle = UIModalPresentationCurrentContext;//关键
[self presentViewController:VC animated:YES completion:nil];
2.iOS8以后的方法:使用UIModalPresentationOverCurrentContext
UIViewController *VC = [[UIViewController alloc]init];
VC.modalPresentationStyle = UIModalPresentationOverCurrentContext;//关键
//UIModalPresentationOverFullScreen全屏效果
[self presentViewController:VC animated:YES completion:nil];
3.可使用该方式判断系统版本
CGFloat versin = [[UIDevice currentDevice].systemVersion floatValue];