mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 05:07:06 +08:00
feat(ios): add intelligents button (#9281)
Co-authored-by: 砍砍 <git@qaq.wiki>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user