Post

Replies

Boosts

Views

Activity

signal SIGABRT when loading a .sks (Swift 5.5)
I'm trying to make my GameOverScene load when I supposedly "die" but all i get in the editor is signal SIGABRT. Here is some code for it. if self.livesArray.count == 0 { let gameOver = SKScene(fileNamed: "GameOverScene") as! GameOverScene //This line causes SIGABRT gameOver.score = self.score self.view?.presentScene(gameOver)} Please can someone help me? Also i dont know where to find the debugger :P
1
0
573
Apr ’22
How to make an updatable ForEach loop SwiftUI
I have a ForEach loop in my code which is used to display text per child of an array (i think it's an array). var flags: [String: Any] = [ "Flag1": "FlagValue" // More values will go here, by default there are no values (but can be // loaded in) ] And this is my code // CONTENT HStack { VStack { ForEach(0...flags.count, id: \.self) { flag in Text("hey") } } } When I start the app there's only one "hey" and no more will show up when I add more flags.
10
0
333
Sep ’24
dismissWindow alternative for macOS 13?
Currently for my SwiftUI application i'm using dismissWindow() to close my windows. However, I want to make my app compatible on macOS 13 to enable a wider audience. My current usage of this function is as follows: func reloadContentViewAfterDelete() { @Environment(\.openWindow) var openWindow @Environment(\.dismissWindow) var dismissWindow dismissWindow(id: "content") openWindow(id: "content") }
1
0
187
Sep ’24