mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
39 lines
846 B
Swift
39 lines
846 B
Swift
//
|
|
// RootViewController.swift
|
|
// App
|
|
//
|
|
// Created by 秋星桥 on 2024/11/18.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
@objc
|
|
class RootViewController: UINavigationController {
|
|
override init(rootViewController _: UIViewController) {
|
|
fatalError() // "you are not allowed to call this"
|
|
}
|
|
|
|
override init(navigationBarClass _: AnyClass?, toolbarClass _: AnyClass?) {
|
|
fatalError() // "you are not allowed to call this"
|
|
}
|
|
|
|
required init?(coder aDecoder: NSCoder) {
|
|
super.init(coder: aDecoder)
|
|
commitInit()
|
|
}
|
|
|
|
override init(nibName _: String?, bundle _: Bundle?) {
|
|
fatalError() // "you are not allowed to call this"
|
|
}
|
|
|
|
func commitInit() {
|
|
assert(viewControllers.isEmpty)
|
|
viewControllers = [AFFiNEViewController()]
|
|
}
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
view.backgroundColor = .systemBackground
|
|
}
|
|
}
|