阻止操作按钮UIActivityViewController更改状态栏文本颜色

时间:2014-04-07 15:47:35

标签: ios objective-c statusbar uiactivityviewcontroller uistatusbar

我在应用程序的工具栏中实现了一个Action(Share)按钮。点击它后,操作表 - UIActivityViewController - 按预期弹出,但它会自动将我以前的黑色状态栏文本更改为白色。如何防止它仍然是黑色?谢谢!

UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[self.pasteboardField.text] applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

将此行设置为info.plist文件:

  

将基于控制器的状态栏外观视为NO

enter image description here