Reputation: 1646
Delete button is not fully visible in smaller resolutions.
func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if (editingStyle == UITableViewCellEditingStyle.delete) {
}
}
Below is my screenshot
Update 1
Screenshot for tableview cell constraints
Upvotes: 3
Views: 216
Reputation: 77641
OK, so from your comment your table view is not constrained to the view properly. So your cells are "hanging" off the right edge of the screen.
To fix this you should add constraints in your storyboard.
Select the table view and hit the add constraints button. Select the four edges and put 0 in the box.
Then hit "add constraints" this should fix the problem you are having.
The add constraints button is the one that looks like a Star Wars Tie Fighter in the bottom right corner of the Interface Builder screen...
Upvotes: 1