Created
April 7, 2017 16:18
-
-
Save anuraagdjain/94a7f262c3c0a921df594686ea62eec6 to your computer and use it in GitHub Desktop.
Custom Height for Delete (Swipe to Delete). Swift 3.X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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