- //源Controller中跳转方法实现 ,不支持旋转。
- MKDialogController *controller = [[MKDialogController alloc] init];
- controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
- if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
- controller.providesPresentationContextTransitionStyle = YES;
- controller.definesPresentationContext = YES;
- controller.modalPresentationStyle = UIModalPresentationOverCurrentContext;
- [self presentViewController:controller animated:YES completion:nil];
- } else {
- self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
- [self presentViewController:controller animated:NO completion:nil];
- self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;
- }
- self.view.backgroundColor = [UIColor clearColor];
- UIView *alphaView = [[UIView alloc] initWithFrame:self.view.frame];
- UIView *baseView = [[UIView alloc] initWithFrame:self.view.frame];
- alphaView.backgroundColor = [UIColor clearColor];
- baseView.backgroundColor = [UIColor blackColor];
- baseView.alpha = 0.7;
- [self.view addSubview:baseView];
- [self.view addSubview:alphaView];
版权声明:本文为博主原创文章,未经博主允许不得转载。
http://blog.csdn.net/liuhongwei123888/article/details/42001277/