mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
43 lines
995 B
Swift
43 lines
995 B
Swift
//
|
|
// BarkNavigationController.swift
|
|
// Bark
|
|
//
|
|
// Created by huangfeng on 2018/6/25.
|
|
// Copyright © 2018 Fin. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import Material
|
|
|
|
class BarkNavigationController: NavigationController{
|
|
override func prepare() {
|
|
super.prepare()
|
|
isMotionEnabled = true
|
|
motionNavigationTransitionType = .autoReverse(presenting: .fade)
|
|
|
|
guard let v = navigationBar as? NavigationBar else {
|
|
return
|
|
}
|
|
|
|
v.depthPreset = .none
|
|
v.dividerColor = Color.grey.lighten2
|
|
|
|
navigationBar.backgroundColor = Color.blue.darken2
|
|
|
|
statusBarStyle = .lightContent
|
|
|
|
}
|
|
|
|
override var childForStatusBarStyle: UIViewController?{
|
|
get {
|
|
return self.topViewController
|
|
}
|
|
}
|
|
}
|
|
|
|
class BarkSnackbarController: SnackbarController {
|
|
override var childForStatusBarStyle: UIViewController?{
|
|
return self.rootViewController
|
|
}
|
|
}
|