在 iPhone 上以编程方式拨打电话并在挂断后返回到同一个应用程序
我会撒谎在我的应用程序中拨打电话(我可以使用电话:),但我想在用户挂断电话后返回到我离开的应用程序。 这可能吗?
I would lie to place a call in my app (I can use the tel:) but I would like to return to my app where I left after the users hangs up.
Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我从苹果网站获得了这段代码,它运行得很好:
I got this code from Apple site and it works perfectly:
不,不是。恐怕用户在电话结束后控制他们导航的位置。默认情况下,它保留在电话应用程序中,用户退出该应用程序的唯一方法是点击主页按钮,这会将他们带到主屏幕。保存您的状态,并在他们像其他人一样回来时重新加载它。
No it's not. The user controls where they navigate after the phone call has ended I'm afraid. by default, it stays in the phone application, and the only way for the user to exit out of it is to hit the home button, which takes them to their main screen. Save your state, and reload it when they come back like everyone else.
通话结束后,您无法自动返回应用程序,但如果您的应用程序支持 iOS 4,则其多任务处理功能(如果应用程序支持)可以将用户带回通话前离开的位置,此时该应用程序已重新启动。
如果您使用 iOS 3 或更早版本,您将需要自己手动保存应用程序的状态,然后在重新启动时将用户带回到该状态。
You cannot return to the app automatically, after the call completes, but if your app supports iOS 4, its multitasking features (if the app supports them) can bring the user back to the spot where he or she left off before the call, when the app is relaunched.
If you use iOS 3 or earlier, you will need to manually save the app's state yourself and then bring the user back to that state on relaunch.