I am new to swift
And programming. Please Anyone Help me for making call in IOS8
using UITabelViewCell
left swipe not to delete A Row but to make a call in iPhone using Swift language
Asked
Active
Viewed 184 times
0

bhuvan alagesan
- 21
- 4
-
What do you want to do when you swipe left ? Delete the row ?? – Stefan Scoarta Jul 01 '15 at 06:37
-
http://stackoverflow.com/questions/24103069/swift-add-swipe-to-delete-tableviewcell – Nikita Leonov Jul 01 '15 at 06:40
-
swipe left is not to delete the row ,swipe left to make call in iPhone using swift – bhuvan alagesan Jul 01 '15 at 06:48
-
Search for information on implementing a UIPanGestureRecognizer in a cell and for opening TEL: URLs – Paulw11 Jul 01 '15 at 06:52
-
Then it is duplicate of http://stackoverflow.com/questions/19164188/custom-edit-view-in-uitableviewcell-while-swipe-left No PanGestureRecognizers required – Nikita Leonov Jul 01 '15 at 06:58
1 Answers
0
If you want to show a Delete or Insert button, you can use the following default functions of UITableView
to accomplish that:
// Override to support conditional editing of the table view.
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
// Return NO if you do not want the specified item to be editable.
return true
}
// Override to support editing the table view.
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
if editingStyle == .Delete {
// Delete the row from the data source
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
} else if editingStyle == .Insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
Although if you want a different custom button, you should have a look at SWTableViewCell
at this link: https://github.com/CEWendel/SWTableViewCell

danialzahid94
- 4,103
- 2
- 19
- 31
-
This question is already answered here http://stackoverflow.com/questions/19164188/custom-edit-view-in-uitableviewcell-while-swipe-left without use of custom frameworks. – Nikita Leonov Jul 01 '15 at 06:59