views:

31

answers:

1

Hi there

Was is the best solution so far for a strike out text on the iPhone

I heard of multiple solutions:

  • Something wth three20
  • Image as a subview
  • UIWebView and something with a NSAttributedString, but I don't find a working example for that.

Cheers

+1  A: 

Here is an example for NSAttributedString: http://stackoverflow.com/questions/2708732/iphone-strike-out-an-nsstring

highlycaffeinated
but what is this myCrossOutAttribute, from where to I get the right attribute?
gabac
`NSStrikethroughStyleAttributeName` appears to be the one you need. The list of available attributes can be found at http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html
highlycaffeinated
I don't get this to work. How do I assign the Attribute. It seems to be an NSDictionary but the attribute is a NSString...
gabac