Rich text view like Instagram Comment

I would like to implement advanced text views as shown on Instagram. Below is a screenshot.

In particular, my goals are:

  • Words at different positions of the same text type can have different font sizes, font colors and font styles (bold, italic, etc.).
  • In the delegate's response calls, sensory events (long press, tap down, etc.) can be detected. Information (which word is affected, whether it is a long press or tap down, etc.) can be collected in such callback methods.

Large frames such as Three20 are out of the question. Small, independent libraries are very preferred. Low Cocoa Touch APIs can also be OK if they don't take more than a few days to complete.

Any suggestions are welcome.

enter image description here

+5
source share
2 answers

Finally, we found the perfect open source solution (supports both iOS 5.0 and iOS 6): OHAttributedLabel, capable of working with both a rich format and touch control.

https://github.com/AliSoftware/OHAttributedLabel

+2
source

NSAttributedString . iOS 5 Erica Sadun, NSMutableAttributedString, , .

Erica githuib

+3

All Articles