title: SwiftUI Touchable Area of a Button
body: <p>I am trying to increase the touchable area of a button inside a NavigationView. It does not work even though the area is made bigger. My code is below: </p>
  
  <pre><code>var body: some View {
  NavigationView {
      List(taskStore.tasks) { tasks in
          Text(tasks.name)
      }
  .navigationBarTitle("Tasks")
  .navigationBarItems(
      trailing: Button(action: { 
      self.modalIsPresented = true 
  }){
       Image(systemName: "plus")
      .frame(width: 200, height: 200)
      .contentShape(Rectangle())
      .background(Color.yellow)
  })}
  </code></pre>
  
  <p>The green area is touchable and the red area isn't touchable. </p>
  
  <p><a href="https://i.stack.imgur.com/obTxB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/obTxB.png" alt="enter image description here"></a></p>
  
  <p>I found a solution online that works. However this solution only works for a button that is NOT in the NavigationView. So if I put the button in "some view" like the following below, it works as per the solution:</p>
  
  <pre><code>var body: some View {
  Button(action: {self.modalIsPresented = true} ) {
  Text("Default padding")
  .padding(50)
  .background(Color.yellow)
  }}}
  </code></pre>
  
  <p>But when I put the button in a Navigation View like my code, the yellow area is not touchable. How can I get the whole yellow area (red box) to be touchable like the solution?</p>
  
  <p>Thanks :D</p>
  
  <p>Example of solution: 
  <a href="https://i.stack.imgur.com/vrDJd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vrDJd.png" alt="enter image description here"></a></p>