I'm trying to achieve something like this in SwiftUI:
I can create the button with rounded corners and I can also place the text in the center of it but that's about it.
I need to be able to place background image and the footer title/text and the icon at the top!
This is what I have so far:
Button(action: {
//self.dismiss?()
})
{
HStack(spacing: 10) {
Image(systemName: "pencil").renderingMode(.template)
Text(audio.name)
//.font(.headline)
.frame(width: 160, height: 200)
.background(Color.gray)
.addBorder(Color.white, width: 1, cornerRadius: 10)
}
}
When I try my code, I get a button with rounded corner and the text in the middle but the Image(systemName: "pencil") is outside of the button for some reason!
Can someone please guide me how to achieve this?
It might be worth mentioning that the background images are coming from a remote server.


