添加打开备忘录跳转

This commit is contained in:
2026-07-12 20:47:19 +08:00
parent 65aa5980ac
commit 849a5e40e4
+11
View File
@@ -79,5 +79,16 @@ extension ViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true) tableView.deselectRow(at: indexPath, animated: true)
let item = menuItems[indexPath.section][indexPath.row]
if item.title == "打开备忘录" {
openSystemNotesApp()
}
}
private func openSystemNotesApp() {
guard let url = URL(string: "mobilenotes://") else { return }
guard UIApplication.shared.canOpenURL(url) else { return }
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} }
} }