| | |
| | | |
| | | tf_input.rx.text.orEmpty.subscribe(onNext: {[unowned self] text in |
| | | self.numberMinutes = text.int ?? 1 |
| | | self.status = .choose(self.numberMinutes) |
| | | }).disposed(by: disposeBag) |
| | | |
| | | } |
| | |
| | | btn_cancel.jq_gradientNibColor(colorArr: [UIColor(hexStr: "#8EA47A").cgColor,UIColor(hexStr: "#AFCA98").cgColor], cornerRadius: 18.5) |
| | | } |
| | | |
| | | |
| | | @IBAction func customReduceAction(_ sender: Any) { |
| | | userCustomer() |
| | | numberMinutes-=1 |
| | | |
| | | numberMinutes = max(1,numberMinutes) |
| | | tf_input.text = numberMinutes.string |
| | | } |
| | | |
| | | @IBAction func customAddAction(_ sender: Any) { |
| | | userCustomer() |
| | | numberMinutes+=1 |
| | | tf_input.text = numberMinutes.string |
| | | } |
| | | |
| | | @IBAction func cancelAction(_ sender: UIButton) { |
| | | endEditing(true) |
| | | |
| | | if case .choose(let v) = status { |
| | | clouse?(status) |
| | | } |
| | | |
| | | private func closeAni(){ |
| | | cons_bottom.constant = -JQ_ScreenH |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.alpha = 0 |
| | | self.layoutIfNeeded() |
| | | } |
| | | } |
| | | |
| | | |
| | | @IBAction func customReduceAction(_ sender: Any) { |
| | | userCustomer() |
| | | var t = tf_input.text?.int ?? 1 |
| | | t = max(1,t) |
| | | status = .choose(t) |
| | | tf_input.text = t.string |
| | | } |
| | | |
| | | @IBAction func customAddAction(_ sender: Any) { |
| | | userCustomer() |
| | | var t = tf_input.text?.int ?? 1 |
| | | t += 1 |
| | | status = .choose(t) |
| | | tf_input.text = t.string |
| | | } |
| | | |
| | | @IBAction func closeAction(_ sender: UIButton) { |
| | | closeAni() |
| | | } |
| | | |
| | | @IBAction func cancelAction(_ sender: UIButton) { |
| | | endEditing(true) |
| | | clouse?(status) |
| | | closeAni() |
| | | } |
| | | |
| | | private func userCustomer(){ |
| | |
| | | status = .choose(numberMinutes) |
| | | default: |
| | | numberMinutes = text!.jq_filterNum().int ?? 0 |
| | | tf_input.text = numberMinutes.string |
| | | // tf_input.text = numberMinutes.string |
| | | status = .choose(numberMinutes) |
| | | } |
| | | }else{ |