cornerRaduis don't work on VStack on visionOS

VStack(spacing: 8) {
}
.padding(20)
.frame(width: 320)
.glassBackgroundEffect()
.cornerRadius(10)
Answered by Vision Pro Engineer in 802361022

Hey @_rdy,

Are you trying to change the corner radius of the glass material? If so, this can be accomplished using the glassBackgroundEffect(in:displayMode:) view modifier. You can provide any InsettableShape to change the shape of the glass material including customizing the corner radius using rect(cornerRadius:style:):

.glassBackgroundEffect(in: .rect(cornerRadius: 10.0))

Hope this helps,
Michael

Hey @_rdy,

Are you trying to change the corner radius of the glass material? If so, this can be accomplished using the glassBackgroundEffect(in:displayMode:) view modifier. You can provide any InsettableShape to change the shape of the glass material including customizing the corner radius using rect(cornerRadius:style:):

.glassBackgroundEffect(in: .rect(cornerRadius: 10.0))

Hope this helps,
Michael

cornerRaduis don't work on VStack on visionOS
 
 
Q