-
Notifications
You must be signed in to change notification settings - Fork 761
Open
Labels
Description
Hi there,
I'm trying to use Swift Messages on Swift UI and for some reason it's not showing
This is the code I'm trying to use:
.onAppear() {
let view = MessageView.viewFromNib(layout: .cardView)
view.configureTheme(.warning)
view.configureDropShadow()
let iconText = ["🤔", "😳", "🙄", "😶"].randomElement()!
view.configureContent(title: "Warning", body: "Consider yourself warned.", iconText: iconText)
view.layoutMarginAdditions = UIEdgeInsets(top: 20, left: 20, bottom: 20, right
(view.backgroundView as? CornerRoundingView)?.cornerRadius = 10
SwiftMessages.show(view: view)
}
I already tried to use in a button click and it didn't work.
Can you help?
Thanks
cymr0