MonoTouch bindings for the delightful TTTAttributedLabel.
MIT License
MonoTouch bindings to the fabulous TTTAttributedLabel library by @mattt.
TTTAttributedLabel label = new TTTAttributedLabel ();
label.Text = new NSString ("I love Tink");
label.AddLinkToURL (new NSUrl ("http://tinkapp.com/"), new NSRange (7, 4));
...
class LabelDelegate : TTTAttributedLabelDelegate {
public override void DidSelectLinkWithURL (TTTAttributedLabel label, NSUrl url)
{
Console.WriteLine ("Clicked URL: {0}", url.ToString ());
}
}
label.Delegate = new LabelDelegate ();
Check out more samples on the original TTTAttributedLabel page.
$ make
Requires xcodebuild
and xbuild
to compile.
Add bindings/MonoTouch.TTTAttributedLabel.dll
to your project and you are all set.
MonoTouch.TTTAttributedLabel is tested on iOS7, but should be compatible with the original TTTAttributedLabel requirements.
Pull requests welcome!
Lukas Lipka
MonoTouch.TTTAttributedLabel is available under the MIT license. See the LICENSE file for more info.