NcAppDelegate.swift
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// NcAppDelegate.swift
// NumberCube
//
// Created by ilCode on 2025/3/27.
//
import UIKit
@main
class NcAppDelegate: UIResponder, UIApplicationDelegate {
var kWindow: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Thread.sleep(forTimeInterval: 2)
// initLogger()
initNaviBar()
initWindow()
return true
}
}
extension NcAppDelegate {
// private func initLogger() {
// _ = HiLoggerTools()
// }
private func initNaviBar() {
GKConfigure.setupCustom {
// 导航栏标题颜色
$0.titleColor = hexColor("#0A120A")
// 导航栏标题字体
$0.titleFont = ncFont(18, isBold: true)
// 导航栏返回按钮样式
$0.backStyle = .black
// 状态栏样式
$0.statusBarStyle = .lightContent
// 导航栏左右item间距
$0.gk_navItemLeftSpace = 15
$0.gk_navItemRightSpace = 15
// 是否恢复系统导航
$0.gk_restoreSystemNavBar = true
// 设置导航栏背景色
// $0.backgroundImage = R.image.navibar_bg()
// 缩放配置
$0.gk_scaleX = 0.90
$0.gk_scaleY = 0.92
// 开启全局UIScrollView处理
$0.gk_openScrollViewGestureHandle = true
// 跳转的时候隐藏标签栏
$0.gk_hidesBottomBarWhenPushed = true
}
}
private func initWindow() {
kWindow = UIWindow.init(frame: UIScreen.main.bounds)
kWindow?.backgroundColor = .white
kWindow?.rootViewController = EntryController()
kWindow?.makeKeyAndVisible()
}
}