Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-05-2011, 04:07 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 9
Frog is on a distinguished road
Default Show text and record click of single words

Hi everyone,

I've got an array and each item contains a dictionary with at key "Name" a word and at key "Description" a description about that word. These words make up a story and I want that story to be showed so users can read it. When a user clicks a word, I want to show the description associated with that word.

I can't figure out how to do this. I tried to use a UITextView, but because it should not editable I can't use textViewDidChangeSelection in combination with the selectedRange property. I also tried to use NSButtons, but that's just a pain to set up and I also don't believe that's a high performance solution.

What is the best way to solve this problem?

Thanks on forehand!
Frog
Frog is offline   Reply With Quote
Old 05-06-2011, 01:20 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 9
Frog is on a distinguished road
Default

Does anybody have an idea?
Frog is offline   Reply With Quote
Old 05-06-2011, 06:43 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: South Florida, US
Posts: 357
lgehrig1 is on a distinguished road
Default

Quote:
Originally Posted by Frog View Post
Does anybody have an idea?
I'd probably build HTML and show it in a UIWebView. You've got Javascript capabilities, so you should be able to float your description.

Alternately - track the touch down locations and match them to where your words are. That would be a lot more complex, though.
lgehrig1 is offline   Reply With Quote
Old 05-07-2011, 03:06 AM   #4 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 9
Frog is on a distinguished road
Default

Using a UIWebView sounds like a "dirty" method to me. I actually prefer to user an other method.

Do you have any idea how you can track location and match them with the words?

I've also looked into Core Text as an alternative, do you have an idea how to do that?
Frog is offline   Reply With Quote
Reply

Bookmarks

Tags
click, uitextview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 353
10 members and 343 guests
dansparrow, iOS.Lover, lorrettaui53, MikaelBartlett, Nobbsy, oztemel, pbart, PlutoPrime, thephotographer, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:56 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0