Merge branch 'develop' into mbruce/inputStepper

This commit is contained in:
Matt Bruce 2024-08-08 11:35:41 -05:00
commit adc5528362
2 changed files with 15 additions and 4 deletions

View File

@ -60,7 +60,16 @@ extension Changeable {
} }
} }
extension Clickable { extension Clickable where Self: UIControl {
func onClickActionPublisher(_ text: String, label: UILabel) {
onClick = { _ in
let handler = labelPublisherCompletionHandler()
handler(text, label)
}
}
}
extension Clickable where Self: UIView {
func onClickActionPublisher(_ text: String, label: UILabel) { func onClickActionPublisher(_ text: String, label: UILabel) {
onClick = { _ in onClick = { _ in
let handler = labelPublisherCompletionHandler() let handler = labelPublisherCompletionHandler()

View File

@ -127,8 +127,9 @@ class TileContainerViewController: BaseViewController<TileContainer> {
topLabel.text = "Do you want to Register?" topLabel.text = "Do you want to Register?"
let topButton = Button() let topButton = Button()
topButton.setTitle("Register", for: .normal) topButton.text = "Register"
topButton.onClick = { c in print("clicked \(c.text!)") }
///bottom ///bottom
let bottomView = View() let bottomView = View()
bottomView.backgroundColor = .green bottomView.backgroundColor = .green
@ -137,7 +138,8 @@ class TileContainerViewController: BaseViewController<TileContainer> {
bottomLabel.text = "Forgot your info?" bottomLabel.text = "Forgot your info?"
let bottomButton = Button() let bottomButton = Button()
bottomButton.setTitle("Forgot Password", for: .normal) bottomButton.text = "Forgot Password"
bottomButton.onClick = { c in print("clicked \(c.text!)") }
mainView.addSubview(topView) mainView.addSubview(topView)
mainView.addSubview(bottomView) mainView.addSubview(bottomView)