Search code examples
swiftstylesedit

Swift Change EditButton()


is there a Way to change the look of the swift

EditButton()

like:

  EditButton(){
                    label: {
                        Image(systemName: "plus.circle")
                        .padding(.top)
                        .font(.title)
                        .foregroundColor(Color.red)
                    }

or do i need any Workaround / an own Editbutton?


Solution

  • Found it out: Works as seen here: SwiftUI change EditButton Text Color In my Case:

    var editButton: some View {
       return Button {
           if editMode == .inactive {
               editMode = .active
           } else {
               editMode = .inactive
           }
       } label: {
           Image(systemName: "plus.circle")
           .padding(.top)
           .font(.title)
           .foregroundColor(Color.red)
       }
    }