I want my preview to only have the size of the view and not show the whole iPhone. I have already tried it with this code:
struct TimerCardView: View {
var body: some View {
Text("Hello, World!")
.padding()
.background(.gray)
}
}
struct TimerCardView_Previews: PreviewProvider {
static var previews: some View {
TimerCardView()
.previewLayout(.sizeThatFits)
}
}
but nothing happened. What am I doing wrong? I appreciate help