-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Almost there with Custom Control. Last step is to actually make HTTP …
…request. Issue: #15
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
OctoPod/Panel UI/Subpanels/UI Components/CustomControlInputViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
} | ||
} |