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.

35 lines
809 B

2 years ago
//
// SinglePickerViewModels.swift
// FireBoltt
2 years ago
//
// Created by lemo on 2018/6/4.
// Copyright © 2020 ecell. All rights reserved.
//
import UIKit
class SinglePickerViewModels: NSObject {
2 years ago
let dataSourceVariable = BehaviorRelay<[String]>(value: [])
var dataSource = [String]()
override init() {
super.init()
}
init(funtionType: FunctionTypeFireBoltt) {
2 years ago
switch funtionType {
case .heartRateMonitor:
dataSource = (1...6).map{"\($0 * 10)"}
case .drinkRemind:
dataSource = (1...6).map{"\($0 * 30)"}
case .sedentary:
dataSource = (1...12).map{"\($0 * 30)"}
default:
dataSource = (1...6).map{"\($0 * 30)"}
}
dataSourceVariable.accept(dataSource)
}
}