|
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 In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.
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.