Notification button position changes
This commit is contained in:
parent
d8549abb10
commit
674641e84e
@ -24,11 +24,15 @@ class NotificationViewController: BaseViewController {
|
|||||||
let secondButtonDefaultText = "Button 2"
|
let secondButtonDefaultText = "Button 2"
|
||||||
|
|
||||||
lazy var notificationTypePickerSelectorView = {
|
lazy var notificationTypePickerSelectorView = {
|
||||||
PickerSelectorView(title: "Info",
|
PickerSelectorView(title: "info",
|
||||||
picker: self.picker,
|
picker: self.picker,
|
||||||
items: Notification.NotificationStyle.allCases)
|
items: Notification.NotificationStyle.allCases)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
lazy var buttonPositionTypePickerSelectorView = {
|
||||||
|
PickerSelectorView(title: "bottom", picker: self.picker, items: Notification.ButtonsPosition.allCases)
|
||||||
|
}()
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
@ -50,6 +54,7 @@ class NotificationViewController: BaseViewController {
|
|||||||
func setupForm() {
|
func setupForm() {
|
||||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
addFormRow(label: "Style", view: notificationTypePickerSelectorView)
|
addFormRow(label: "Style", view: notificationTypePickerSelectorView)
|
||||||
|
addFormRow(label: "Button Position", view: buttonPositionTypePickerSelectorView)
|
||||||
addFormRow(label: "Title", view: titleTextField)
|
addFormRow(label: "Title", view: titleTextField)
|
||||||
addFormRow(label: "SubTitle", view: subTitleTextField)
|
addFormRow(label: "SubTitle", view: subTitleTextField)
|
||||||
addFormRow(label: "Hide Button Group", view: buttonGroupToggle)
|
addFormRow(label: "Hide Button Group", view: buttonGroupToggle)
|
||||||
@ -104,6 +109,9 @@ class NotificationViewController: BaseViewController {
|
|||||||
self?.notificationView.type = item
|
self?.notificationView.type = item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buttonPositionTypePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
|
self?.notificationView.buttonPosition = item
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupButtons(with firstButtonText: String? = nil, secondButtonText: String? = nil) {
|
func setupButtons(with firstButtonText: String? = nil, secondButtonText: String? = nil) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user