弹出view背景半透明的控制器,用于实现类似于自定义弹出框(带蒙版), UIview透明自定义弹出框
程序员文章站
2022-07-07 21:32:44
...
//弹出view背景半透明的控制器,用于实现类似于自定义弹出框(带蒙版),
UIViewController *rootControler=self.view.window.rootViewController;
TestViewController *test=[[TestViewController alloc] init];
test.view.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.8];
rootControler.modalPresentationStyle=UIModalPresentationCurrentContext;
[rootControler presentViewController:test animated:YES completion:nil];
UIViewController *rootControler=self.view.window.rootViewController;
TestViewController *test=[[TestViewController alloc] init];
test.view.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.8];
rootControler.modalPresentationStyle=UIModalPresentationCurrentContext;
[rootControler presentViewController:test animated:YES completion:nil];
上一篇: JDBC加载Driver