Post

Replies

Boosts

Views

Activity

toolbarBackground on macOS full screen
This sample code colorise the navigation bar, but while the window is in fullscreen or in splitView on the Mac, only the left sidebar is colorised. How can be the full navigation bar be colorised also on full screen? var body: some Scene { WindowGroup { NavigationSplitView { ForEach(1..<3) { (i) in Text("\(i)") } } detail: { ForEach(1..<3) { (i) in Text("\(i)") } } .toolbarBackground(.yellow) } }
1
1
641
Apr ’23
Manage European Union digital services act compliance information
On App Store there is the new request to declared if I am a trader operator or not under the new EU law. As many I'm a single developer so the declaration can be reduced to "any natural person [...] who is acting [...] for purposes relating to his or her trade, business, craft or profession.", to learn more Apple links to EU commission. I'm not 100% sure if, a single developer whit very small business and which use only Apple Store to distribute its apps, can declared "This is the account of a supplier who is not a trader". Is someone more legal expert than me able to replay?
7
4
4.6k
May ’24
SCNNode into SKScene is deformed when hit an object
Into a SKScene, I add a SCNSphere as a child of SKShapeNode, as depicted below. When the sphere hit another node (the fence in the example) the sphere is deformed as it were elastic. I didn't found any information about elastic properties. Someone know a way to avoid the deformation? import SwiftUI import SpriteKit import SceneKit @main struct MyApp: App { var body: some Scene { WindowGroup {SpriteView(scene: GameSceneSK(size: UIScreen.main.bounds.size))} } } class GameSceneSK: SKScene { override func sceneDidLoad() { var fencePoints = [ CGPoint(x: 300, y: 0), CGPoint(x: 300, y: 400), CGPoint(x: 0, y: 400) ] let fence = SKShapeNode(points: &fencePoints, count: fencePoints.count) fence.physicsBody = SKPhysicsBody(edgeChainFrom: fence.path!) addChild(fence) let sphereGeometry = SCNSphere(radius: 20) let sphereNode = SCNNode(geometry: sphereGeometry) let sphereScnScene = SCNScene() sphereScnScene.rootNode.addChildNode(sphereNode) let ball3D = SK3DNode(viewportSize: CGSize(width: 40, height: 40)) ball3D.scnScene = sphereScnScene let ball = SKShapeNode(circleOfRadius: 20) ball.physicsBody = SKPhysicsBody(circleOfRadius: 20) ball.addChild(ball3D) physicsWorld.gravity = CGVector(dx: 0.2, dy: 0.2) addChild(ball) } }
2
0
787
Nov ’24
listRowSeparatorTint not updated
This sample code exhibits two issues: struct ContentView: View { @State private var myColor = Color.red var body: some View { VStack() { List() { Text("Object") Text("Object") Text("Object") .listRowSeparatorTint(myColor) Text("Object") } Button(action:{myColor = Color.green}) {Text("Change color")} } .foregroundColor(myColor) } } the row separator isn't redraws when the @State property change listRowSeparatorTint apply to two lines The first point is really disappointing. Is there anyone which know if this is a bug or there is a more correct way to use listRowSeparatorTint with changing parameter?
2
0
168
Apr ’25