Use a system scan tab slot with MainScanTabItem interception so scanner presentation no longer depends on CYL PlusButton, and remove the CYLTabBarController pod dependency. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
714 B
Swift
22 lines
714 B
Swift
//
|
||
// MainScanTabItem.swift
|
||
// suixinkan
|
||
//
|
||
|
||
import UIKit
|
||
|
||
@MainActor
|
||
/// 主 TabBar 中间扫码核销入口,负责构建系统 TabBarItem。
|
||
enum MainScanTabItem {
|
||
|
||
/// 构建系统扫码 TabBarItem,点击行为由 `MainTabBarController` 拦截处理。
|
||
static func makeTabBarItem() -> UITabBarItem {
|
||
let image = UIImage(named: "icon_scan")?.withRenderingMode(.alwaysOriginal)
|
||
let selectedImage = UIImage(named: "icon_scan")?.withRenderingMode(.alwaysOriginal)
|
||
let item = UITabBarItem(title: "扫码", image: image, selectedImage: selectedImage)
|
||
item.accessibilityLabel = "扫码核销"
|
||
item.accessibilityIdentifier = "main.scan"
|
||
return item
|
||
}
|
||
}
|