AlertToast icon indicating copy to clipboard operation
AlertToast copied to clipboard

When custom AlertStyle applied image not showed

Open djardon opened this issue 4 years ago • 0 comments

When configure AlertToast same like follow, the image not showed:


AlertToast(displayMode: .banner(.slide),
                          type: .image("icon_warning", Color.white),
                          title: "Messages may span more than one line,.",
                          style: AlertToast.AlertStyle.style(backgroundColor: Color.defaultOrangeColor,
                                                             titleColor: Color.white,
                                                             titleFont: Font.regular16))

You need to add .renderingMode(.template) when set .foregroundColor(color) to the Image in your banner view

djardon avatar Nov 03 '21 13:11 djardon