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)
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
This simple text:
Text("10'20\"")
when the localisation is a RightToLeft, like Arabic
on iMac show "20'10
on iOS show 10'20"
Which is the correct one?
Why the are different?
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?
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)
}
}
With "Requires full screen" Split View and Slide Over are disabled but the line on the bottom of the screen remains.
How can that line removed as when a video is displayed full screen?
Topic:
UI Frameworks
SubTopic:
General
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?