CoreTextHyperlinkView for iOS

6:05 PM
[caption id="attachment_548" align="alignleft" width="200" caption="CoreTextHyperlinkView"]CoreTextHyperlinkView[/caption]

Uses AutoHyperlinks code from Adium http://code.google.com/p/maccode/wiki/AutoHyperlinks Project includes an example of how to use the core text view. It's pretty simple - create the view with a 0 height frame, set the attributes, set its text, and then ask it for it's size so that the height is just correct. It will calculate based on the constraining width, and any padding that you set. There is also a Twitter specific subclass that enables @usernames and #hashtags to be linkified. Settable Attributes: textAlignment textColor linkColor highlightedLinkColor fontName fontSize paddingTop paddingLeft backgroundImage bgImageTopStretchCap bgImageLeftStretchCap

View Source


https://github.com/jasarien/CoreTextHyperlinkView

Artikel Terkait

Next Article
« Prev Post
Previous Article
Next Post »
Penulisan markup di komentar
  • Untuk menulis huruf bold gunakan <strong></strong> atau <b></b>.
  • Untuk menulis huruf italic gunakan <em></em> atau <i></i>.
  • Untuk menulis huruf underline gunakan <u></u>.
  • Untuk menulis huruf strikethrought gunakan <strike></strike>.
  • Untuk menulis kode HTML gunakan <code></code> atau <pre></pre> atau <pre><code></code></pre>, dan silakan parse kode pada kotak parser di bawah ini.

Disqus
Tambahkan komentar Anda

No comments