showing action sheet in the custom cell in Swift
I have a custom cell that contains a button inside it, I want to show an action sheet when the button is pressed, but as u know , UITableViewCell is doesn't have the method "presentViewController", so what should I do? In your custom cell's swift file, write a protocol to be conformed by your viewContoller, // your custom cell's swift file protocol CustomCellDelegate { func showActionSheet() } class CustomTableViewCell : UITableViewCell { var delegate: CustomCellDelegate? // This is the method you need to call when button is tapped. @IBAction func buttonTapped() { // When the button is pressed