In my application there is UITextView
containing an email address. When I touch and hold on email address, then an action sheet pops up with following buttons on it:
How to perform custom action on "New message" button click?
First you implement UIActionSheetDelegate
in your .h file and then do it..
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0)
{
// here you can perform new message action
}
else
{
// here you can perform add new contact action
}
}