iOS 弹出透明窗体viewcontroller【兼容iOS8以上】
UIViewController *controller = self.view.window.rootViewController; controller.modalPresentationStyle = UIModalPresentationCurrentContext; if (CURRENT_DEVICE >=8.0) { lockScreenController.modalPresentationStyle = UIModalPresentationOverCurrentContext; } else { controller.modalPresentationStyle = UIModalPresentationCurrentContext; } [controller presentViewController:lockScreenController animated:YES completion:^{ // 背景色透明 lockScreenController.view.superview.backgroundColor = [UIColor clearColor]; }];