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.
31 lines
699 B
31 lines
699 B
![]()
2 years ago
|
//
|
||
|
// HomeTabBarViewModel.swift
|
||
|
// Lookfit
|
||
|
//
|
||
|
// Created by lemo. on 2020/3/7.
|
||
|
// Copyright © 2020 Sheldon. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
import RxCocoa
|
||
|
import RxSwift
|
||
|
|
||
|
class HomeTabBarViewModel: ViewModel {
|
||
|
|
||
|
let tabBarItems: [HomeTabBarItem] = [.health, .sport, .device, .mine]
|
||
|
|
||
|
override init() {
|
||
|
super.init()
|
||
|
}
|
||
|
|
||
|
func viewModel(for tabBarItem: HomeTabBarItem) -> ViewModel {
|
||
|
switch tabBarItem {
|
||
|
// case .health: return HealthViewModel()
|
||
|
case .health: return HealthHomeViewModel()
|
||
|
case .sport: return SportViewModel()
|
||
|
case .device: return DeviceViewModel()
|
||
|
case .mine: return MineViewModel()
|
||
|
}
|
||
|
}
|
||
|
}
|