added onClickPublisher

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-03-17 14:23:20 -05:00
parent 2eee432ac0
commit fa2d49c54e

View File

@ -159,11 +159,10 @@ public class Notification: View {
$0.size = .small
}
firstButton.publisher(for: .touchUpInside).sink { button in
firstButton.onClickSubscriber = firstButton.publisher(for: .touchUpInside).sink { button in
print("\(button.text) has been pressed")
}.store(in: &subscribers)
}
#warning("Upon adding the button into the stack view, button is visible. Where as ButtonGroup with a single button is not rendered")
///This below doesn't work