Skip to content

Commit

Permalink
[attributedlabel] More example images and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jverkoey committed Jun 23, 2012
1 parent eed60c8 commit ea12516
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Binary file added docs/gfx/NIAttributedLabel_autoDetectLinksOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gfx/NIAttributedLabel_autoDetectLinksOn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/attributedlabel/src/NimbusAttributedLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,25 @@ label.text = @"Nimbus";
* the types of data that are detected by modifying the
* @link NIAttributedLabel::dataDetectorTypes dataDetectorTypes@endlink property.
*
* @image html NIAttributedLabel_autoDetectLinksOff.png "Before enabling autoDetectLinks"
*
@code
// Enable link detection on the label.
myLabel.autoDetectLinks = YES;
@endcode
*
* @image html NIAttributedLabel_autoDetectLinksOn.png "After enabling autoDetectLinks"
*
* Enabling automatic link detection will enable user interation with the label view so that the
* user can tap the detected links.
*
* Detected links will use @link NIAttributedLabel::linkColor linkColor@endlink and
* @link NIAttributedLabel::highlightedLinkColor highlightedLinkColor@endlink to differentiate
* themselves from standard text. highlightedLinkColor is the color of the highlighting frame
* around the text.
* around the text. You can easily add underlines to links by enabling
* @link NIAttributedLabel::linksHaveUnderlines linksHaveUnderlines@endlink. You can customize link
* attributes in more detail by directly modifying the
* @link NIAttributedLabel::attributesForLinks attributesForLinks@endlink property.
*
*
* <h4>A note on performance</h4>
Expand All @@ -105,6 +112,11 @@ myLabel.autoDetectLinks = YES;
* The NIAttributedLabelDelegate protocol allows you to handle when the user taps on a given link.
* The protocol methods provide the tap point as well as the data pertaining to the tapped link.
*
@code
- (void)attributedLabel:(NIAttributedLabel *)attributedLabel didSelectTextCheckingResult:(NSTextCheckingResult *)result atPoint:(CGPoint)point {
[[UIApplication sharedApplication] openURL:result.URL];
}
@endcode
*
* <h3>Explicit Links</h3>
*
Expand Down

0 comments on commit ea12516

Please sign in to comment.