Skip to content

Instantly share code, notes, and snippets.

@anuraagdjain
Created April 7, 2017 16:18
Show Gist options
  • Select an option

  • Save anuraagdjain/94a7f262c3c0a921df594686ea62eec6 to your computer and use it in GitHub Desktop.

Select an option

Save anuraagdjain/94a7f262c3c0a921df594686ea62eec6 to your computer and use it in GitHub Desktop.
Custom Height for Delete (Swipe to Delete). Swift 3.X
override func layoutSubviews() {
super.layoutSubviews()
var subviews: [Any] = self.subviews
let subview = subviews[0] as! UIView
if subview.classForCoder.debugDescription() == "UITableViewCellDeleteConfirmationView" {
subview.frame.size.height = 50
subview.frame.origin.y = 10
subview.clipsToBounds = true
subview.layer.masksToBounds = true
}
}
//Add the above code into your custom tableview cell swift file. Change the height and y value to change the position.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment