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

View Single Post
Old 03-04-2010, 10:35 PM   #1 (permalink)
aharding
Registered Member
 
Join Date: Mar 2010
Posts: 2
aharding is on a distinguished road
Default How to Multiple Colors in String?

I have a table row view with a header and a couple of table rows.

How do I vary the color of the text within the strings without using a WebViewController?

If I need rich text, can I use the table row view for say the first three levels and then the WebViewController for the last level in the tree?

Lets say the bottom layer has the following:

Header - Best books
Table Row 1 - Best books for travel in America.
Table Row 2 - Best books for travel in Europe.
Table Row 3 - Best books for cooking.

So in this example, I would like the text in the table rows to be marked up as follows:

Table Row 1 - Best books for travel in America.
Table Row 2 - Best books for travel in Europe.
Table Row 3 - Best books for cooking.

So to make the table row information quicker to scan I have done the following:
Made Best books lighter in color since the exact words are already stated in the header.
Made America, Europe & cooking in Orange since these are the words that are different in each sentence. This way the user can quickly see which table row they would like to select.

The data is being pulled from CoreData and is working right now except for not being able to figure out how to make different parts of the string different colors based on a comparison between two or three table rows and the section header.

Any ideas as to direction? I can write the code but just don't know where to start? Ideas would be greatly appreciated!

Last edited by aharding; 03-04-2010 at 10:35 PM. Reason: Colors didn't take
aharding is offline   Reply With Quote
 

» Advertisements
» Online Users: 765
21 members and 744 guests
baja_yu, ChrisYates, dansparrow, dbramhall, Droverson, Duncan C, eski, flamingliquid, Gaz, gogoman, iconomania, iOS.Lover, ipodphone, jadoo3010, MattPo, mehmood.memon, mraalex, pipposanta, poke, Saurman, taylor202
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,531
Threads: 94,052
Posts: 402,639
Top Poster: BrianSlick (7,979)
Welcome to our newest member, jadoo3010
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:37 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.