You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.7 KiB
79 lines
1.7 KiB
// |
|
// ViewController.swift |
|
// Lookfit |
|
// |
|
// Created by lemo. on 2020/3/7. |
|
// Copyright © 2020 Sheldon. All rights reserved. |
|
// |
|
|
|
import UIKit |
|
//import NVActivityIndicatorView |
|
|
|
class ViewController: UIViewController, Navigatable { |
|
|
|
var viewModel: ViewModel? |
|
var navigator: Navigator! |
|
/// 导航栏显示 |
|
var isHiddenNavBar = false |
|
/// 电池栏颜色 默认黑色 |
|
var isLightStatusBar = false |
|
/// 是否标题居中显示 |
|
var isTitleCenter = false |
|
|
|
var navigationTitle = "" { |
|
didSet { |
|
if isTitleCenter { |
|
navigationItem.title = navigationTitle |
|
} |
|
} |
|
} |
|
|
|
init(viewModel: ViewModel?, navigator: Navigator) { |
|
self.viewModel = viewModel |
|
self.navigator = navigator |
|
super.init(nibName: nil, bundle: nil) |
|
} |
|
|
|
required init?(coder aDecoder: NSCoder) { |
|
super.init(nibName: nil, bundle: nil) |
|
} |
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
super.viewWillAppear(animated) |
|
// 处理需要隐藏导航栏的控制器 |
|
navigationController?.setNavigationBarHidden(isHiddenNavBar, animated: animated) |
|
} |
|
|
|
override public func viewDidLoad() { |
|
super.viewDidLoad() |
|
makeUI() |
|
bindViewModel() |
|
handleEvent() |
|
} |
|
|
|
override func viewDidAppear(_ animated: Bool) { |
|
super.viewDidAppear(animated) |
|
logResourcesCountss() |
|
} |
|
|
|
func makeUI() { |
|
view.backgroundColor = ThemeManager.commonBgColor |
|
} |
|
|
|
func bindViewModel() { |
|
|
|
} |
|
|
|
func updateUI() { |
|
|
|
} |
|
|
|
func handleEvent() { |
|
|
|
} |
|
|
|
|
|
func tongzhi(){ |
|
|
|
} |
|
}
|
|
|