1

I want to draw a score string where the latest change is another color like 1-0 and the "1" number should be red. According to various posts I could do this with UIWebView or using Three20 or Nimbus.

UIWebView seems like a tempting solution but I would think it would strain the device showing 5-10 webviews in a UITableView?

Anyone done this with MonoTouch? From my Googling the bindings against Three20 isn't the easiest to setup and I didn't see anyone had done the bindings against Nimbus. The class I would like to use is this one: http://docs.nimbuskit.info/_n_i_attributed_label_8m_source.html

poupou
  • 43,413
  • 6
  • 77
  • 174
Christer Nordvik
  • 2,518
  • 3
  • 35
  • 52

1 Answers1

0

Your usage seems simple. Perhaps using NSAttributedString would be enough ?

See How do you use NSAttributedString? for an Objective-C sample. From a quick look translating this to C# should not be hard (compared to using 3rd parties libraries).

Community
  • 1
  • 1
poupou
  • 43,413
  • 6
  • 77
  • 174
  • I need to show the string in a UILabel, and from this link: http://stackoverflow.com/questions/2452356/is-it-possible-to-set-multiple-color-in-uilabel it seems that is not possible without another set of 3rd party labels that have no MonoTouch bindings :-/ – Christer Nordvik Dec 31 '11 at 21:59
  • IMHO it's likely easier to create your own *managed* control (more control, easier build steps...) on top of `NSAttributedString` than to wrap an existing library. OTOH you can use `btouch` to create your own binding library for the 3rd party control that best fits your need. The nice things about MonoTouch is that you have both options available to you :-) – poupou Jan 01 '12 at 09:12
  • Thanks, I like using others proved-to-work code so will have a look at btouch :-) – Christer Nordvik Jan 03 '12 at 13:13
  • Here are the bindings for Nimbus. The attribute label bindings will eventually be added. https://github.com/theonlylawislove/MonoTouch.Nimbus – Paul Knopf May 07 '13 at 03:38