From 44e8084a7d9302b136c453abaa365a7a79f9fdff Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sun, 26 Aug 2018 15:45:56 -0700 Subject: [PATCH] Almost there with Custom Control. Last step is to actually make HTTP request. Issue: #15 --- .../CustomControlInputViewCell.swift | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 OctoPod/Panel UI/Subpanels/UI Components/CustomControlInputViewCell.swift diff --git a/OctoPod/Panel UI/Subpanels/UI Components/CustomControlInputViewCell.swift b/OctoPod/Panel UI/Subpanels/UI Components/CustomControlInputViewCell.swift new file mode 100644 index 00000000..4eaddf6e --- /dev/null +++ b/OctoPod/Panel UI/Subpanels/UI Components/CustomControlInputViewCell.swift @@ -0,0 +1,29 @@ +import UIKit + +class CustomControlInputViewCell: UITableViewCell { + + @IBOutlet weak var inputLabel: UILabel! + @IBOutlet weak var inputValueField: UITextField! + + var row: Int! + + var executeControlViewController: ExecuteControlViewController! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + @IBAction func valueChanged(_ sender: Any) { + // Notify parentVC of new value for this Input + if let text = inputValueField.text { + executeControlViewController.valueUpdated(row: row, value: text as AnyObject) + } + } +}