添加格式化日志页面跳转

This commit is contained in:
2026-07-12 20:50:00 +08:00
parent 849a5e40e4
commit 677b860395
5 changed files with 32 additions and 9 deletions
-2
View File
@@ -150,7 +150,6 @@
INFOPLIST_FILE = Note/Info.plist; INFOPLIST_FILE = Note/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 26.0; IPHONEOS_DEPLOYMENT_TARGET = 26.0;
@@ -183,7 +182,6 @@
INFOPLIST_FILE = Note/Info.plist; INFOPLIST_FILE = Note/Info.plist;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 26.0; IPHONEOS_DEPLOYMENT_TARGET = 26.0;
+17
View File
@@ -0,0 +1,17 @@
//
// FormatLogViewController.swift
// Note
//
// Created by fish on 2026/7/12.
//
import UIKit
class FormatLogViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
title = "格式化日志"
view.backgroundColor = .systemBackground
}
}
+1 -2
View File
@@ -15,8 +15,7 @@
<string>Default Configuration</string> <string>Default Configuration</string>
<key>UISceneDelegateClassName</key> <key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict> </dict>
</array> </array>
</dict> </dict>
+7 -4
View File
@@ -13,10 +13,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. guard let windowScene = (scene as? UIWindowScene) else { return }
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). window = UIWindow(windowScene: windowScene)
guard let _ = (scene as? UIWindowScene) else { return } let rootViewController = ViewController()
let navigationController = UINavigationController(rootViewController: rootViewController)
window?.rootViewController = navigationController
window?.makeKeyAndVisible()
} }
func sceneDidDisconnect(_ scene: UIScene) { func sceneDidDisconnect(_ scene: UIScene) {
+7 -1
View File
@@ -81,8 +81,14 @@ extension ViewController: UITableViewDelegate {
tableView.deselectRow(at: indexPath, animated: true) tableView.deselectRow(at: indexPath, animated: true)
let item = menuItems[indexPath.section][indexPath.row] let item = menuItems[indexPath.section][indexPath.row]
if item.title == "打开备忘录" { switch item.title {
case "打开备忘录":
openSystemNotesApp() openSystemNotesApp()
case "格式化日志":
let viewController = FormatLogViewController()
navigationController?.pushViewController(viewController, animated: true)
default:
break
} }
} }