How do you make an Add Button that adds a Text? - Already Answered ✅
How do you make an add button that opens a sheet and there is a TextField that you can set to any text and when you press "Add" it will add the text that you put on the TextField and put it in the list..
I tried searching it up "How to make a button that adds a text in swiftUI" on google but the steps didnt work..
22 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I already know that
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
like when your pressing a button it adds another button
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
what if the user is adding alot of buttons
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
but how do i make it, so that the user can set the label of the button and add it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
create the code
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
k
got it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
thx
so do i add a @AppStorage() variable on the table so it will save?
nvrmd
theres another problem...
How do you have multiple states in ForEach
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
like having 2 states in 1 foreach
like when i try:
it doesnt work
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
lemme try it
hmm
theres an error
so how do you fix it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Buggy Technic
nvrmd figured out how to have 2 tables in 1 forEach using the struct Identifiable thingy