I have a text box in Swift with a background colour applied. However, the background covers some of the text as seen here
I want there to be some space between the text and the border of the background colour.
Here is my current code
Text(newData3)
.foregroundColor(.gray)
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color.yellow).frame(width: 400, alignment: .center)
.cornerRadius(30)
.padding(10)
I'm new to Swift so I'm not sure what to try. Any help would be much appreciated.