I'm sorry that I write only now, thanks for your help, the Toggle works now.
Post
Replies
Boosts
Views
Activity
Thanks for your answer, but I cant use @StateObject, because I use Swift UI v.1.
I just call the delete function by the last element's index right now, I tested the function in this way. Now I need to get the selected item's id, and i'll delete that.
Ohh sry for my extra questions, next time i'll close the thread and start a new one.
I would like to share the selection var to an other view, bc I would like to delete the selected one.
I need the id, bc my delete function delete by id now.
+1 How to get the selected item's id?
I dont know why, but the opacity wasn't enough, the texts took the same space on the view, just disappeared.
Added the two texts to the post.
I noticed that there is an empty space because of my two texts if the isEditMode is true, I reconsidered the question.
Thank you very much for your help, it works well!
Since the question, I have already corrected the tick variable to idx, but thank you for your comment!