mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
52 lines
1.1 KiB
Swift
52 lines
1.1 KiB
Swift
//
|
|
// BaseViewController.swift
|
|
// Bark
|
|
//
|
|
// Created by huangfeng on 2018/6/25.
|
|
// Copyright © 2018 Fin. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import Material
|
|
class BaseViewController: UIViewController {
|
|
|
|
let viewModel:ViewModel
|
|
init(viewModel:ViewModel) {
|
|
self.viewModel = viewModel
|
|
super.init(nibName: nil, bundle: nil)
|
|
|
|
self.view.backgroundColor = Color.grey.lighten5
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
override var preferredStatusBarStyle: UIStatusBarStyle{
|
|
get {
|
|
return .lightContent
|
|
}
|
|
}
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
self.navigationItem.largeTitleDisplayMode = .automatic
|
|
makeUI()
|
|
}
|
|
var isViewModelBinded = false
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
if !isViewModelBinded {
|
|
isViewModelBinded = true
|
|
self.bindViewModel()
|
|
}
|
|
}
|
|
|
|
func makeUI() {
|
|
|
|
}
|
|
func bindViewModel(){
|
|
|
|
}
|
|
}
|