The iOS framework that grows only as fast as its documentation
<NIAttributedLabelDelegate> Protocol Reference

Overview

The methods declared by the NIAttributedLabelDelegate protocol allow the adopting delegate to respond to messages from the NIAttributedLabel class and thus respond to selections.

Tasks

Managing Selections
(void) - attributedLabel:didSelectTextCheckingResult:atPoint:
 
(BOOL) - attributedLabel:shouldPresentActionSheet:withTextCheckingResult:atPoint:
 

Method Documentation

attributedLabel:didSelectTextCheckingResult:atPoint:

Informs the receiver that a data detector result has been selected.

- (void)attributedLabel:(NIAttributedLabel *)attributedLabel didSelectTextCheckingResult:(NSTextCheckingResult *)result atPoint:(CGPoint)point;
Discussion
Parameters
attributedLabelAn attributed label informing the receiver of the selection.
resultThe data detector result that was selected.
pointThe point within attributedLabel where the result was tapped.

attributedLabel:shouldPresentActionSheet:withTextCheckingResult:atPoint:

Asks the receiver whether an action sheet should be displayed at the given point.

- (BOOL)attributedLabel:(NIAttributedLabel *)attributedLabel shouldPresentActionSheet:(UIActionSheet *)actionSheet withTextCheckingResult:(NSTextCheckingResult *)result atPoint:(CGPoint)point;
Discussion

If this method is not implemented by the receiver then actionSheet will always be displayed.

actionSheet will be populated with actions that match the data type that was selected. For example, a link will have the actions "Open in Safari" and "Copy URL". A phone number will have "Call" and "Copy Phone Number".

Parameters
attributedLabelAn attributed label asking the delegate whether to display the action sheet.
actionSheetThe action sheet that will be displayed if YES is returned.
resultThe data detector result that was selected.
pointThe point within attributedLabel where the result was tapped.
Returns
YES if actionSheet should be displayed. NO if actionSheet should not be displayed.