title: Stop repeating UIImage background pattern image - Swift
body: <p>I'm using swipe to delete in UITableView. In swipe I need to add image. When I add image it repeats. How to stop repeating</p>
  
  <pre><code> func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -&gt; [UITableViewRowAction]? {
          let deleteButton = UITableViewRowAction(style: .default, title: "Delete") { (action, indexPath) in
              self.tableView.dataSource?.tableView!(self.tableView, commit: .delete, forRowAt: indexPath)
              return
          }
  
          deleteButton.backgroundColor = UIColor(patternImage: #imageLiteral(resourceName: "favourite_delete"))
          deleteButton.title = ""
              return [deleteButton]
  }
  </code></pre>
  
  <p>Problem</p>
  
  <p><a href="https://i.stack.imgur.com/lFN50.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFN50.png" alt="enter image description here"></a></p>
  
  <p>What I need</p>
  
  <p><a href="https://i.stack.imgur.com/PZ1Sc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PZ1Sc.png" alt="enter image description here"></a></p>