swift - 从日历返回我的应用程序

标签 swift calendar

我是我的应用程序,我在给定时间有此代码:

UIApplication.sharedApplication().openURL(NSURL(string: "calshow://")!)

这会将您带到设备的日历。我怎样才能回到执行该行的场景?

谢谢。

编辑:

按 home(option+shift+h,因为我的 iOS 模拟器中未显示该框架)会将您带回家,而不是应用程序,因为它应该是这样。

最佳答案

引用自 this :

Unlike other platforms such as Android, iPhone does not create a stack of actions (back stacking on Android). What this means is that if you do decide to launch another application, your application will not resume when the user exits from the application you opened.

如果用户想返回您的应用程序,他们应该按 home (option+shift+H) 两次,然后从列表中选择您的应用程序。

iOS9 在左上角引入了一个新的“返回应用程序”按钮,可让您返回应用程序。从应用程序显示日历后,您应该会看到此按钮。

关于swift - 从日历返回我的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33217152/

相关文章:

javascript - Google 日历 API - 无法列出辅助日历中的事件

ios - @testable import "projectName"没有将所有文件导入测试用例

swift - 带有容器 View 的 ScrollView 不能正确调整内容大小

ios - 在后台运行 JSON 请求 Swift 4

swift - RealityKit – 获取 ModelEntity 大小作为 SIMD3<Float>

r - 如何访问 timeDate 中的 "correct"假期

java - 比较 enum 与 int、Calendar 类

java - 为什么 Java 日历报告的日期不正确?

java - Java 中的日历

ios - 如何将 iPad UI 添加到现有应用程序?