从应用程序iOS9打开设置

时间:2015-12-07 11:31:20

标签: ios settings ios9

我正在尝试通过按钮操作从我的应用程序打开设置,我知道以下代码有效但我怎么能在iOS 9上做类似的事情?

  [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"General&path=Network/VPN"]];

或者还有其他方法可以从应用程序打开设置页面吗?
如果无法打开Wifi设置?

找到解决方案:

 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Safari"]];

1 个答案:

答案 0 :(得分:2)

你可以这样做,从你的应用程序打开设置页面

defimpl Plug.Exception, for: Ecto.NotSingleResult do
  def status(_exception), do: 404
end

# other `defimpl Plug.Exception`s here if needed