I have created a my own custom cell in a nib file and I am receiving an error I don’t understand.
[self presentViewController:_myMail animated:YES completion:nil];
In this line I receive there error No visible @interface for "LeadCell" declares the selector presentViewController:animated:completion:
LeadCell is the name of the controller for the custom. I would like to create an action where the user clicks the button and it opens a mail composer view to send an email.
Any clarity would be appreciated.
A clean way to solve this problem would be to store the view controller with your custom cell, like this:
When you create new cells in your “cell for row at index path”, pass the view controller to the initializer of the cell. This way, the cell would be able to “find” the controller, letting you code your action by using
ctrlinstead ofself: