|
Hi, I'm trying to get Xcode to build a particular view to run in the Simulator or on the Phone, which is useful when Paul has multiple views in his xcode project. (Project6 in this case) However, when I try to run the below code, I get an error: Command CompileSwiftSources failed with a nonzero exit code Google hasnt helped me resolve it. Can anyone tell me what I am doing wrong?
|
|
@randmtask doesn't have a clear view of the problem:
First, you are asking the right questions. There are a number of programmers here eager to help you grok this material. Next, take a step back from your code and look at it from the compiler's point of view. I like to think of a But your preview code is telling SwiftUI to assemble a view from a (Lego) kit named Your This is fine, but does nothing. Toggling this boolean has no effect on the other Lego kit, This may not be the root of the problem, but I'd start there to eliminate unnecessary confusion. Keep Coding |
|
One other thought. You may find the compiler reminding you that the Instead, the newer version of this modifier asks you to include a Suggest changing the modifier to:
|
|
Finally, here's what I think about Please add your own thoughts to the discussion. |
|
If you want to have all the animation in one project Make a NEW
and then make a NEW
Then in the
This will not produce any errors. |
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.