Last active
August 29, 2015 13:57
-
-
Save lipka/9429277 to your computer and use it in GitHub Desktop.
LinkAttributes on MonoTouch.TTTAttributedLabel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TTTAttributedLabel _notesLabel = new TTTAttributedLabel (); | |
NSMutableParagraphStyle paragraphStyle = new NSMutableParagraphStyle (); | |
paragraphStyle.Alignment = UITextAlignment.Center; | |
_notesLabel.LinkAttributes = new NSMutableDictionary () { | |
{ UIStringAttributeKey.ParagraphStyle, paragraphStyle }, | |
{ UIStringAttributeKey.ForegroundColor, UIColor.Blue }, | |
}; | |
_notesLabel.ActiveLinkAttributes = new NSMutableDictionary () { | |
{ UIStringAttributeKey.ParagraphStyle, paragraphStyle }, | |
{ UIStringAttributeKey.ForegroundColor, UIColor.Green }, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment