模态弹出一个半透明页面

InputViewController *vc = [[InputViewController alloc] init];

self.definesPresentationContext = YES;//这个必须设置

vc.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.4];

vc.modalPresentationStyle = UIModalPresentationOverCurrentContext;

[self presentViewController:vc animated:YES completion:nil];

弹出一个半透明的页面,能够看到下一个页面的内容。一般用于点击回复

posted @ 2016-08-25 13:51  陌路迷殇  阅读(766)  评论(1)    收藏  举报