docs/docsets/SwipeCellKit.docset/Contents/Resources/Documents/Protocols/SwipeTableViewCellDelegate.html
public protocol SwipeTableViewCellDelegate: class
The SwipeTableViewCellDelegate protocol is adopted by an object that manages the display of action buttons when the cell is swiped.
`
tableView(_:editActionsForRowAt:for:)
`
Asks the delegate for the actions to display in response to a swipe in the specified row.
Swift
func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]?
| tableView |
The table view object which owns the cell requesting this information.
|
| indexPath |
The index path of the row.
|
| orientation |
The side of the cell requesting this information.
|
An array of SwipeAction objects representing the actions for the row. Each action you provide is used to create a button that the user can tap. Returning nil will prevent swiping for the supplied orientation.
`
tableView(_:editActionsOptionsForRowAt:for:)
` Default implementation
Asks the delegate for the display options to be used while presenting the action buttons.
Note
If not implemented, a default SwipeOptions instance is used.
Swift
func tableView(_ tableView: UITableView, editActionsOptionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptions
| tableView |
The table view object which owns the cell requesting this information.
|
| indexPath |
The index path of the row.
|
| orientation |
The side of the cell requesting this information.
|
A SwipeOptions instance which configures the behavior of the action buttons.
`
tableView(_:willBeginEditingRowAt:for:)
` Default implementation
Tells the delegate that the table view is about to go into editing mode.
Swift
func tableView(_ tableView: UITableView, willBeginEditingRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation)
| tableView |
The table view object providing this information.
|
| indexPath |
The index path of the row.
|
| orientation |
The side of the cell.
|
`
tableView(_:didEndEditingRowAt:for:)
` Default implementation
Tells the delegate that the table view has left editing mode.
Swift
func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?, for orientation: SwipeActionsOrientation)
| tableView |
The table view object providing this information.
|
| indexPath |
The index path of the row.
|
| orientation |
The side of the cell.
|
`
visibleRect(for:)
` Default implementation
Asks the delegate for visibile rectangle of the table view, which is used to ensure swipe actions are vertically centered within the visible portion of the cell.
Note
The returned rectange should be in the table view’s own coordinate system. Returning nil will result in no vertical offset to be be calculated.
Swift
func visibleRect(for tableView: UITableView) -> CGRect?
| tableView |
The table view object providing this information.
|
The visible rectangle of the table view.
© 2018 Mohammad Kurabi. All rights reserved. (Last updated: 2018-05-26)
Generated by jazzy ♪♫ v0.8.4, a Realm project.