|
Hello, Tortoises:
say I have this array:
and a hibernation struct
aswell as an add view here:
How would I add elements to the hibernations Array in the Tortoise struct? preferably from all of the variables the addview changes? Thankyou in advance! |
|
Since
You can even combine the two operations:
|
|
Hello @roosterboy this is my fault there actually isn't an @ObservedObject var hibernations: Hibernations it is just using the hibernation variable inside of Tortoise, how would I do it now? |
|
He might, we all might, have an issue solving this as you've not provided the definition of the Off the top of my head, I'd think you should pull all your In general you should keep all your business logic for adding, updating, and removing tortoises in one class. |
|
Edited. I originally had a seperate hibernations class but I want to make each tortoise have it's own array of Hibernations so i can have them in different for each loops depending on what tortoise is doing the Hibernation. |
|
Zebs updated his post showing a sparse
Likewise in your |
SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.