fixed issues with tilecontainer base change
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
0c0afcd296
commit
4a6e4b1cdd
@ -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()
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user