Sorry for the late reply.
Where is the button?
Where is the list? In AddView, the "Create" button is located at the bottom. Here it is with all its modifiers:
Button(action: {}) {
Text("Create")
.bold()
}.disabled(self.cardInfo.name.isEmpty	self.cardInfo.id.isEmpty	self.cardInfo.cname.isEmpty)
.foregroundColor(.white)
.padding()
.padding(.horizontal, 100)
.background(Color.accentColor)
.cornerRadius(10)
The disabled modifier is disabling it entirely, even if I add a value to the TextFields. I need some way to change that. The || dividers aren't showing because it screws up the code block.
On my second thing, there is no action specified. That's what I'd like to replace with something to have the now completed (and, correct me if I'm wrong) cardInfo to pass through CardRow and end up in the List that is located in CardsView:
List {
ForEach(cards) { cards in
NavigationLink(destination: CardFullView(cname: cardsInfo.newCard.cname)) {
CardRow(cname: cardsInfo.newCard.cname, name: cardsInfo.newCard.name, id: cardsInfo.newCard.id)
}
}
.onDelete(perform: onDelete)
.onMove(perform: onMove)
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: