title: How to resize a UITableViewRowAction to fit custom sized tableViewCell? - Swift 3
body: <p>In my app I customized my <code>TableViewCell</code> to display like a card. I also implemented custom <code>UITableViewRowActions</code> for those cells. However the actions look weird because I added a layer to make the cell look like a floating card.</p>
  
  <p><a href="https://i.stack.imgur.com/rlceU.png" rel="nofollow noreferrer">Here's what it looks like</a>
  And here's my code for my <code>cellForRowAt</code> function.</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "someCell", for: indexPath) as! CustomCell
          cell.delegate = self
  
          cell.backgroundColor = .clear
          cell.contentView.backgroundColor = .clear
  
          let whiteRoundedView: UIView = UIView(frame: CGRect(x: 10, y: 8, width: self.view.frame.size.width - 20, height: cell.frame.size.height - 20))
          whiteRoundedView.layer.backgroundColor = CGColor(colorSpace: CGColorSpaceCreateDeviceRGB(), components: [1.0, 1.0, 1.0, 0.9])
          whiteRoundedView.layer.masksToBounds = false
          whiteRoundedView.layer.cornerRadius = 2.0
          whiteRoundedView.layer.shadowOffset = CGSize(width: -1, height: 1)
          whiteRoundedView.layer.shadowOpacity = 0.2
          cell.contentView.addSubview(whiteRoundedView)
          cell.contentView.sendSubview(toBack: whiteRoundedView)
  
          cell.updateCell()
          return cell
      }
  </code></pre>
  
  <p>And my <code>UITableViewRowAction</code> function. Forewarning: I am using this <a href="https://github.com/jerkoch/SwipeCellKit" rel="nofollow noreferrer">SwipeCellKit</a> repository</p>
  
  <pre><code>func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -&gt; [SwipeAction]? {
          if orientation == .left {
              guard isSwipeRightEnabled else { return nil }
              let completeAction = SwipeAction(style: .default, title: "Complete") { (action, index) in
                  print("complete!")
  
              }
              completeAction.backgroundColor = .green
              return [completeAction]
          } else {
              let deleteAction = SwipeAction(style: .destructive, title: "Delete") { (action, index) in
                  print("delete")
              }
              return [deleteAction]
          }
      }
  </code></pre>
  
  <p>Is there any way to resize the <code>UITableViewRowAction</code> to fit that mold of the cell?</p>