Post

Replies

Boosts

Views

Activity

Reply to Xcode 13 beta has issues during build storyboards
Are you using third party frameworks ? With which version of Xcode was the project created ? Have you looked at the issues Navigator (left pane in Xcode) to see if you have warnings to update to new settings ? If so, update, then clean build folder and restart Xcode. Try again to build again. If you still have the problem, create a phony new project, and try to build. What do you get ?
Aug ’21
Reply to Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
When you post code, please format code in a more readable way and use code formatter, such as: struct NavigationIndicator: UIViewControllerRepresentable { typealias UIViewControllerType = ARVieww func makeUIViewController(context: Context) -> ARVieww { return ARVieww() } func updateUIViewController(_ uiViewController: NavigationIndicator.UIViewControllerType, context: UIViewControllerRepresentableContext) { } } Where exactly do you get the crash ?
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to MacOS Development Reference
I am confused on which path to head down : SwiftUI or Appkit. I (personal opinion) recommend to stay with Appkit. Because of maturity of SwiftUI and because it introduces another layer that make things even more complex. Here a a good tutorial series to start: h t t p s : / / w w w .raywenderlich.com/731-macos-development-for-beginners-part-1 h t t p s : / / w w w .raywenderlich.com/730-macos-development-for-beginners-part-2 h t t p s : / / w w w .raywenderlich.com/729-macos-development-for-beginners-part-3 And this, it's an old document (2013) but very detailed: https://developer.apple.com/library/archive/referencelibrary/GettingStarted/RoadMapOSX/chapters/01_Introduction.html
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’21
Reply to Is there a way to detect when an SKPhysicsBody stops bouncing?
A way would be to observe velocity. When it is zero, object is at rest. You need to detect it is really at rest and not just bouncing, by reading velocity at 2 close time points. There is even a simpler way: use isResting property. This property is automatically set to true by the physics simulation when it determines that the body is at rest. This means that the body is at rest on another body in the system. Resting bodies do not participate in the physics simulation until an impulse is applied to the object or another object collides with it. This improves the performance of the physics simulation. If all bodies in the world are resting, the entire simulation is at rest, reducing the number of calculations that are performed by the physics world.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Unknown class QuoteDetailViewController in Interface Builder file with Xcode 12
You put the prepare in the wrong class. override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destination. // Pass the selected object to the new view controller. if let quoteViewController = segue.destination as? QuoteDetailViewController { if let selectedQuote = sender as? String { quoteViewController.quote = selectedQuote } } } It should be in the QuoteTableViewController and not in QuoteDetailViewController. I changed and now one get the label. In fact, there is no segue from QuoteDetailViewController. Note: the code on GitHub is quoteViewController.quote = selectedQuote not quoteViewController.title = selectedQuote Just change and get :
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21