Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在视图控制器的顶部添加SLComposeServiceViewController_Ios_Objective C_Uiviewcontroller - Fatal编程技术网

Ios 在视图控制器的顶部添加SLComposeServiceViewController

Ios 在视图控制器的顶部添加SLComposeServiceViewController,ios,objective-c,uiviewcontroller,Ios,Objective C,Uiviewcontroller,我试图在现有的视图控制器(包含地图的导航控制器)的基础上提供一个SLComposeServiceViewController。当我展示SLComposeServiceViewController时,它有一个黑色背景,并覆盖在我现有的视图上 我使用的代码是: SLComposeServiceViewController *composeVC = [[SLComposeServiceViewController alloc]init]; composeVC.placeholder = @"Ente

我试图在现有的视图控制器(包含地图的导航控制器)的基础上提供一个SLComposeServiceViewController。当我展示SLComposeServiceViewController时,它有一个黑色背景,并覆盖在我现有的视图上

我使用的代码是:

SLComposeServiceViewController *composeVC = [[SLComposeServiceViewController alloc]init];

composeVC.placeholder = @"Enter your post";
[self presentViewController:composeVC animated:YES completion:nil];
这是我所看到的一个例子

如何在现有视图的顶部显示视图

  SLComposeServiceViewController *composeVC = [[SLComposeServiceViewController alloc]init];

composeVC.placeholder = @"Enter your post";
composeVC.modalPresentationStyle = UIModalPresentationStyleOverCurrentContext;
[self presentViewController:composeVC animated:YES completion:nil];