我试图在我现有的视图控制器上呈现SLComposeServiceViewController
,它是一个包含地图的导航控制器。当我展示SLComposeServiceViewController
时,它会显示黑色背景并将其覆盖在我现有的视图上。
我使用的代码是:
SLComposeServiceViewController *composeVC = [[SLComposeServiceViewController alloc]init];
composeVC.placeholder = @"Enter your post";
[self presentViewController:composeVC animated:YES completion:nil];
这是我所看到的一个例子
如何在现有视图的顶部显示视图?
答案 0 :(得分:8)
SLComposeServiceViewController *composeVC = [[SLComposeServiceViewController alloc]init];
composeVC.placeholder = @"Enter your post";
composeVC.modalPresentationStyle = UIModalPresentationStyleOverCurrentContext;
[self presentViewController:composeVC animated:YES completion:nil];