UITabBar
未在 iOS 13.2 上显示
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
window = UIWindow(frame: UIScreen.main.bounds)
let rootViewController = UITabBarController()
rootViewController.viewControllers = [RecordController()]
window?.rootViewController = rootViewController
window?.makeKeyAndVisible()
return true
}
}
并且UINavigationBar
未在 iOS 13.2 上显示
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
FirebaseApp.configure()
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = UINavigationController(rootViewController: RecordController())
window?.makeKeyAndVisible()
return true
}
}
这在 iOS 12 及更早版本上完美运行