1

I am writing an iphone app for learning synonyms. Certain words which have a synonym will be clickable. Upon clicking one of those word, the word should get highlighted and a popup should list a bunch of synonyms. Upon clicking on one of the synonyms, the word should get replaced by its synonym.

I have the following questions:

  1. What are the different ways of displaying, say an article of a few thousand words? One way is a WebView. Any others?

  2. How can I achieve this "highlight the word and popup a list of synonyms" effect. I see a similar situation when I click on an word on a webpage in safari on my iphone. A word gets highlighted and a popup with the option "copy"

Amarsh
  • 11,214
  • 18
  • 53
  • 78

1 Answers1

2

You could look into using an NSAttributedString with OHAttributedLabel. Another alternative may be the EgoTextView.

Reference: iphone/ipad: How exactly use NSAttributedString?

Community
  • 1
  • 1
Joe
  • 56,979
  • 9
  • 128
  • 135
  • Thanks Joe. I am looking into NSAttributedString and OHAttributedLabel . Meanwhile, Can you help me with the first question ... what are the various ways of displaying a lot of text on the iPhone. UILabel may be a possibility, but I dont know if I can put, say, three pages of text on it, and would it be scrollable, etc. UITextView is an option. Is there any other option? Which UI element does the default email app for iPhone/iPad use? – Amarsh Jul 24 '12 at 08:41
  • I am not sure what email uses but it is likely a `UIWebView`. You could try a `UILabel` inside of a `UIScrollView`. – Joe Jul 24 '12 at 11:57