Post

Replies

Boosts

Views

Activity

visionOS SwiftUI rounded square button
I'm writing a visionOS App using SwiftUI language, in which I wrote a button with the following code: import SwiftUI Button(action: { openWindow(id: landmark.windowTag) }) { VStack { Image(landmark.imageName) .resizable() .aspectRatio(contentMode: .fill) .clipShape(RoundedRectangle(cornerRadius: 10)) .frame(width: 150, height: 150) VStack(alignment: .leading){ Text(landmark.name) .font(.title) .foregroundColor(.white) Text(landmark.describe) .font(.subheadline) .foregroundColor(.gray) } } .frame(width: 200, height: 400) .padding() .clipShape(RoundedRectangle(cornerRadius: 20)) } .padding(20) My idea is that the border of the button is a rounded square (note that I'm not talking about the picture is a rounded square, but the border of the button is a rounded square), but the default button border of visionOS is oval, so I added the following code: .clipShape(RoundedRectangle(cornerRadius: 20)) But there is no change in operation, and the border of the button has not become a rounded square. It is still the default oval of visionOS. How can I modify the code?
1
0
1.8k
Aug ’23
About Apple Vision Pro Developer Kit
It has been more than a month since I applied for the Apple Vision Pro Developer Kit in July, and there is still no answer. I didn't get much from asking Apple Developer Support. Just tell me to let I'm waiting. I hope to get some information provided by everyone, thank you 🙏! In Dev Kit Apply page: We’ve received your application. Thank you for your interest. We’ll get back to you soon with your status. If you wish to withdraw your application, you may do so.
1
2
733
Sep ’23
UIKit in visionOS
The default framework of visionOS is SwiftUI, but it can also be combined with UIKit in SwiftUI, and Apple has also released video documents and other content for this purpose. But what I want to know is that SwiftUI is much simpler than UIKit, but why does Apple recommend developers to combine with UIKit in SwiftUI? I also want to know what are the advantages of SwiftUI and UIKit in visionOS? I hope you can reply to my two questions. Thank you!
1
0
646
Sep ’23