mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
40 lines
1.1 KiB
Swift
40 lines
1.1 KiB
Swift
//
|
|
// BarkNavigationController.swift
|
|
// Bark
|
|
//
|
|
// Created by huangfeng on 2018/6/25.
|
|
// Copyright © 2018 Fin. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import Material
|
|
class BarkNavigationController: UINavigationController{
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
self.navigationBar.prefersLargeTitles = true
|
|
}
|
|
}
|
|
|
|
class BarkSnackbarController: SnackbarController {
|
|
override var childForStatusBarStyle: UIViewController?{
|
|
return self.rootViewController
|
|
}
|
|
}
|
|
|
|
class StateStorageTabBarController: UITabBarController, UITabBarControllerDelegate {
|
|
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
if self.delegate == nil {
|
|
if let index:Int = Settings[.selectedViewControllerIndex] {
|
|
self.selectedIndex = index
|
|
}
|
|
self.delegate = self
|
|
}
|
|
}
|
|
|
|
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
|
Settings[.selectedViewControllerIndex] = self.selectedIndex
|
|
}
|
|
}
|