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
2.4k
Aug ’23
Some question about visionOS
I have some question about visionOS: Does Apple open the eye tracking API to developers? If I want to know how to achieve it, when the eyes are stared at a specific View, a Boolean value can be changed to true, and when the eyes are removed from this View, it will become false. In ImmersiveSpace, when immersionStyle is .full or .progressive, a black background will appear by default. How can I turn this background into a panorama of my own? In ImmersiveSpace, how to make a View always follow the user?
2
0
703
Nov ’23
visionOS's "offset3D"
In visionOS, have many code with 3D attributes (SwiftUI) is adapted from the code in iOS, like: .padding(_:) to .padding3D(_:). In iOS have .offset(x:_, y:_), it only have X and Y, but in visionOS, view is in a 3D scene, so I want offset have Z, but offset can't use Z, so I try offset3D: import SwiftUI //Some View .offset3D(x: Number, y: Number, z: Number) Xcode report an error: Error: No member 'offset3D' So do you now how to use like offset's Modifiers, and can use Z in visionOS.
1
0
680
Nov ’23
transporter
How to use transporter?
Replies
1
Boosts
0
Views
1.2k
Activity
Feb ’22
createML Importing Xcode swiftui app
I used createML to generate a text-categorized mlmodel file. I want to import it into my app and let users use it. How can I pour in and write code? Please note: 1. My app was written with SwiftUI. 2. This createML mlmodel file is used for text classification.
Replies
1
Boosts
0
Views
1k
Activity
Sep ’22
Unity games are on the shelves of arcade
Excuse me, games developed with Unity can be put on the arcade?
Replies
0
Boosts
0
Views
991
Activity
May ’23
MapKit with vision
Does visionOS support mapkit?
Replies
2
Boosts
0
Views
1.8k
Activity
Nov ’24
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?
Replies
1
Boosts
0
Views
2.4k
Activity
Aug ’23
Some questions about Arcade
Does anyone have any income after downloading the game on Apple arcade? Can arcade be put on the shelves of visionOS games?
Replies
0
Boosts
0
Views
687
Activity
Aug ’23
VisionOS Game Development
I want to do visionOS games. Which one is better, SwiftUI or UIKit? What are the advantages?
Replies
4
Boosts
0
Views
1.3k
Activity
Aug ’23
About Apple Vision Pro Developer Kit
Does anyone have any latest news about the Apple Vision Pro Developer Kit? Developer Kit Link
Replies
1
Boosts
0
Views
732
Activity
Sep ’23
Join the Apple developer program with the same identity
I now have a developer account to join the Apple developer program. Now I want to add a new developer account to the Apple developer program (with the same identity) without my original account being affected. What should I do?
Replies
0
Boosts
0
Views
437
Activity
Sep ’23
Join the Apple developer program with the same identity
I now have a developer account to join the Apple developer program. Now I want to add a new developer account to the Apple developer program (with the same identity) without my original account being affected. What should I do?
Replies
0
Boosts
0
Views
434
Activity
Sep ’23
Reputation of Apple Developer Program account
May I ask how to find the credibility of the Apple Developer Program account?
Replies
1
Boosts
0
Views
559
Activity
Oct ’23
TipKit with visionOS
Is TipKit compatible with visionOS?
Replies
1
Boosts
0
Views
719
Activity
Nov ’23
visionOS with GroupActivities
In visionOS, in order to fully implement Group Activities, do we need to write additional code?
Replies
1
Boosts
0
Views
718
Activity
Nov ’23
Some question about visionOS
I have some question about visionOS: Does Apple open the eye tracking API to developers? If I want to know how to achieve it, when the eyes are stared at a specific View, a Boolean value can be changed to true, and when the eyes are removed from this View, it will become false. In ImmersiveSpace, when immersionStyle is .full or .progressive, a black background will appear by default. How can I turn this background into a panorama of my own? In ImmersiveSpace, how to make a View always follow the user?
Replies
2
Boosts
0
Views
703
Activity
Nov ’23
visionOS's "offset3D"
In visionOS, have many code with 3D attributes (SwiftUI) is adapted from the code in iOS, like: .padding(_:) to .padding3D(_:). In iOS have .offset(x:_, y:_), it only have X and Y, but in visionOS, view is in a 3D scene, so I want offset have Z, but offset can't use Z, so I try offset3D: import SwiftUI //Some View .offset3D(x: Number, y: Number, z: Number) Xcode report an error: Error: No member 'offset3D' So do you now how to use like offset's Modifiers, and can use Z in visionOS.
Replies
1
Boosts
0
Views
680
Activity
Nov ’23