title: How do I keep multiple button actions separate in SwiftUI ForEach content?
body: <p>I have a list of items with a checkbox a title and a timer icon: </p>
  
  <p><a href="https://i.stack.imgur.com/EYuYN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EYuYN.png" alt="enter image description here"></a></p>
  
  <p>The checkbox is a button and the timer icon is a button that have unique actions associated with them. However, if I tap anywhere inside the cell, it triggers both button actions simultaneously. It is intended that they operate independently of each other as well as the tap in the cell. How do I modify the following code to keep the actions separate? </p>
  
  <pre><code>List {
        ForEach(tasks, id: \.self) { task in
              HStack {
  
                  Button(action: {
                      task.isComplete.toggle()
                      try? self.moc.save()
                      print("Done button tapped")
                  }) {
                      Image(systemName: task.isComplete ? "square.fill" : "square")
                  }
                  .padding()
  
                  Text(task.name ?? "Unknown Task")
                  Spacer()
  
                  Button(action: {
                      print("timer button tapped")
                  }) {
                      Image("timer")
                  }    
              }
          }
          .onDelete(perform: deleteTask)
      }
  </code></pre>