Advance UIKit rewrite with AMap integration and core UI modules.
Integrate高德 SDK with simulator-safe build flags, add map views for operating area and punch points, refactor main tabs and key feature screens to UIKit with Diffable lists, and document Swift concurrency defaults in AGENTS.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -29,19 +29,47 @@ enum AppTab: String, CaseIterable, Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
var systemImage: String {
|
||||
/// 选中态 TabBar 图标资源名。
|
||||
var selectedImageName: String {
|
||||
switch self {
|
||||
case .home:
|
||||
"house"
|
||||
"TabHomeSelected"
|
||||
case .orders:
|
||||
"doc.text"
|
||||
"TabOrderSelected"
|
||||
case .statistics:
|
||||
"chart.bar"
|
||||
"TabDataSelected"
|
||||
case .profile:
|
||||
"person"
|
||||
"TabProfileSelected"
|
||||
}
|
||||
}
|
||||
|
||||
/// 未选中态 TabBar 图标资源名。
|
||||
var unselectedImageName: String {
|
||||
switch self {
|
||||
case .home:
|
||||
"TabHomeUnselected"
|
||||
case .orders:
|
||||
"TabOrderUnselected"
|
||||
case .statistics:
|
||||
"TabDataUnselected"
|
||||
case .profile:
|
||||
"TabProfileUnselected"
|
||||
}
|
||||
}
|
||||
|
||||
/// 构建系统 TabBarItem,供 `UITabBarController` 使用。
|
||||
func makeTabBarItem() -> UITabBarItem {
|
||||
let unselectedImage = UIImage(named: unselectedImageName)?.withRenderingMode(.alwaysOriginal)
|
||||
let selectedImage = UIImage(named: selectedImageName)?.withRenderingMode(.alwaysOriginal)
|
||||
let item = UITabBarItem(
|
||||
title: title,
|
||||
image: unselectedImage,
|
||||
selectedImage: selectedImage
|
||||
)
|
||||
item.accessibilityIdentifier = "main.tab.\(rawValue)"
|
||||
return item
|
||||
}
|
||||
|
||||
/// 构建 Tab 根页面 ViewController。
|
||||
func makeRootViewController(services: AppServices) -> UIViewController {
|
||||
switch self {
|
||||
|
||||
Reference in New Issue
Block a user