updated notification
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
68f5da116d
commit
090afa2f01
@ -290,6 +290,7 @@
|
|||||||
EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */,
|
EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */,
|
||||||
EAC9257F29119FC400091998 /* TextLinkViewController.swift */,
|
EAC9257F29119FC400091998 /* TextLinkViewController.swift */,
|
||||||
EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */,
|
EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */,
|
||||||
|
445BA07929C088470036A7C5 /* NotificationViewController.swift */,
|
||||||
EA89201828B56DF5006B9984 /* RadioBoxGroupViewController.swift */,
|
EA89201828B56DF5006B9984 /* RadioBoxGroupViewController.swift */,
|
||||||
EAF7F11928A14A0E00B287F5 /* RadioButtonViewController.swift */,
|
EAF7F11928A14A0E00B287F5 /* RadioButtonViewController.swift */,
|
||||||
EA84F76128BE4AE500D67ABC /* RadioSwatchGroupViewController.swift */,
|
EA84F76128BE4AE500D67ABC /* RadioSwatchGroupViewController.swift */,
|
||||||
@ -299,7 +300,6 @@
|
|||||||
EA5E305B295111050082B959 /* TileletViewController.swift */,
|
EA5E305B295111050082B959 /* TileletViewController.swift */,
|
||||||
EA5E30542950EA6E0082B959 /* TitleLockupViewController.swift */,
|
EA5E30542950EA6E0082B959 /* TitleLockupViewController.swift */,
|
||||||
EA3C3BB328996775000CA526 /* ToggleViewController.swift */,
|
EA3C3BB328996775000CA526 /* ToggleViewController.swift */,
|
||||||
445BA07929C088470036A7C5 /* NotificationViewController.swift */,
|
|
||||||
);
|
);
|
||||||
path = ViewControllers;
|
path = ViewControllers;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|||||||
@ -26,7 +26,7 @@ extension UIView {
|
|||||||
|
|
||||||
extension ButtonBase {
|
extension ButtonBase {
|
||||||
func labelPublisher(_ label: UILabel){
|
func labelPublisher(_ label: UILabel){
|
||||||
publisher(for: .touchUpInside)
|
onClickSubscriber = publisher(for: .touchUpInside)
|
||||||
.sink { control in
|
.sink { control in
|
||||||
let newText = "\(control.text!) clicked - "
|
let newText = "\(control.text!) clicked - "
|
||||||
if let labelText = label.text {
|
if let labelText = label.text {
|
||||||
@ -38,7 +38,7 @@ extension ButtonBase {
|
|||||||
label.text = "\(newText)1"
|
label.text = "\(newText)1"
|
||||||
}
|
}
|
||||||
print("clicked me")
|
print("clicked me")
|
||||||
}.store(in: &subscribers)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@ class MenuViewController: UITableViewController {
|
|||||||
MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self),
|
MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self),
|
||||||
MenuComponent(title: "InputField", completed: false, viewController: InputFieldViewController.self),
|
MenuComponent(title: "InputField", completed: false, viewController: InputFieldViewController.self),
|
||||||
MenuComponent(title: "Label", completed: true, viewController: LabelViewController.self),
|
MenuComponent(title: "Label", completed: true, viewController: LabelViewController.self),
|
||||||
|
MenuComponent(title: "Notification", completed: false, viewController: NotificationViewController.self),
|
||||||
MenuComponent(title: "RadioBoxGroup", completed: true, viewController: RadioBoxGroupViewController.self),
|
MenuComponent(title: "RadioBoxGroup", completed: true, viewController: RadioBoxGroupViewController.self),
|
||||||
MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonViewController.self),
|
MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonViewController.self),
|
||||||
MenuComponent(title: "RadioSwatchGroup", completed: true, viewController: RadioSwatchGroupViewController.self),
|
MenuComponent(title: "RadioSwatchGroup", completed: true, viewController: RadioSwatchGroupViewController.self),
|
||||||
@ -88,8 +89,7 @@ class MenuViewController: UITableViewController {
|
|||||||
MenuComponent(title: "TileContainer", completed: true, viewController: TileContainerViewController.self),
|
MenuComponent(title: "TileContainer", completed: true, viewController: TileContainerViewController.self),
|
||||||
MenuComponent(title: "Tilelet", completed: false, viewController: TileletViewController.self),
|
MenuComponent(title: "Tilelet", completed: false, viewController: TileletViewController.self),
|
||||||
MenuComponent(title: "TitleLockup", completed: true, viewController: TitleLockupViewController.self),
|
MenuComponent(title: "TitleLockup", completed: true, viewController: TitleLockupViewController.self),
|
||||||
MenuComponent(title: "Toggle", completed: true, viewController: ToggleViewController.self),
|
MenuComponent(title: "Toggle", completed: true, viewController: ToggleViewController.self)
|
||||||
MenuComponent(title: "Notification", completed: false, viewController: NotificationViewController.self)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||||
|
|||||||
@ -21,18 +21,14 @@ class NotificationViewController: BaseViewController {
|
|||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
notificationView.titleLabel.text = "Good morning"
|
notificationView.titleText = "Good morning"
|
||||||
notificationView.subTitleLabel.text = "SecondLabel information"
|
notificationView.subTitleText = "SecondLabel information"
|
||||||
|
notificationView.primaryButtonModel = .init(text: "First", onClick: { button in
|
||||||
let firstButton = Button()
|
print("\(button.text!) button click")
|
||||||
firstButton.use = .secondary
|
})
|
||||||
firstButton.size = .small
|
notificationView.secondaryButtonModel = .init(text: "Second", onClick: { button in
|
||||||
|
print("\(button.text!) button click")
|
||||||
let secondButton = Button()
|
})
|
||||||
secondButton.use = .primary
|
|
||||||
secondButton.size = .small
|
|
||||||
|
|
||||||
notificationView.buttonsView.buttons = [firstButton,secondButton]
|
|
||||||
addContentTopView(view: notificationView)
|
addContentTopView(view: notificationView)
|
||||||
|
|
||||||
setupForm()
|
setupForm()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user