I have my code as follows:
Rectangle()
.fill(Color.red)
.frame(width: 60, height: 60, alignment: .center)
.cornerRadius(recording ? 5 : 30)
So I was wondering if .frame
could be conditional just like .cornerRadius
is. I am doing that in order to morph the shape, however I also need to make it smaller when it morphs. An example is a Voice Memos app's record button.