ios:如何显示“选择无线连接”弹出窗口?
如果没有互联网连接,并且您使用 Ipad 或 Iphone 启动 safari 应用程序,则会出现一个弹出窗口,显示:“选择无线网络”
有没有办法强制此弹出窗口在我想要的时候显示在我的应用程序中?
问题是,我的应用程序中有一个按钮可以将用户连接到 Facebook。按下按钮后,Safari 浏览器将打开并显示 Facebook 授权页面。如果没有互联网连接,则会出现此弹出窗口,但无法从那里返回到应用程序。因此,目前我在允许出现此授权页面之前检查互联网连接,但我也想显示此弹出窗口。
If there is no internet connection and you start for example the safari app with Ipad or Iphone, a popup appears saying: "Choose wireless network"
Is there a way to force this popup to show up in my app when I want to?
The problem is, I have a button in my app which connects the user to facebook. After pressing the button the safari browser opens and shows the facebook authorization page. If there is no internet connection this popup appears, but there is no way to turn back to the app from there. So currently I check internet connection before allowing this authorization page to appear, but I also want to show this popup.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您的应用尝试访问基于互联网的资源并且没有建立 WiFi 连接,但附近有 WiFi 接入点,它将自动显示。
It will show up automatically if your app tries to access internet-based resource and there's no wifi connection established but there is a wifi access point nearby.
如果您在 ...-Info.plist 中将“应用程序使用 Wi-Fi”设置为“是”并且没有连接,则此对话框会自动出现。
This dialog appears automatically if you have "Application uses Wi-Fi" set to YES in your ...-Info.plist and if there is no connection.
这是不可能的。您之前看到的弹出窗口位于“设置”->“设置”中。
Wi-Fi
->请求加入网络
->ON/OFF
将此项设置为 ON 允许操作系统在发现任何可达的 Wi-Fi 网络且您当前未连接到该网络时提示用户加入 Wi-Fi 网络。
应用程序无法显示此提示,这是系统级提示。
This is not possible. The pop-up you have seen before is in
Settings
->Wi-Fi
->Ask to Join Networks
->ON/OFF
Setting this to ON allows the OS to prompt the user to join a Wi-Fi network if it finds any in reach and you are not currently connected to one.
Apps cannot show this prompt, it's a system-level prompt.