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 01-03-2011, 09:55 PM   #1 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 2
sonic6241 is on a distinguished road
Send a message via Skype™ to sonic6241
Default setText to a UITextView & reading labels from file

I'm very new to iOS development so, yeah.... bear with me.

Im making an app that, when opened, provides a main menu that is composed of 4 buttons (and a view controller to match) [this main menu is similar to the DropBox main menu with the pictures]

The main menu leads to a UITableView of names. Right now I have the names entered manually like:

skits = [[NSArray alloc] initWithObjects:
@"Falling Rock",
@"Medicrane",
@"Candy Store",
@"Construction",
nil];


I would like to have the names read from a .rtf file for easier editing.

How would I go about doing that?

From that, the UITableView leads to a UITextView that displays the info.

How can I read the text for the UITextView from a file?

Can I read the same rtf file for all of the different choices in the
UITableView? (maybe separate them by slashes or different
headers in the file?)


I could always type the paragraphs in the code but since there are hundreds, id rather not.
sonic6241 is offline   Reply With Quote
Old 01-03-2011, 10:06 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 327
thomashw is on a distinguished road
Default

Don't try to use an RTF file. Create files in either JSON or XML format and parse them.

Look into NSXMLParser or here for a good JSON framework for Objective-C.
thomashw is offline   Reply With Quote
Old 02-16-2011, 03:12 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2010
Posts: 2
sonic6241 is on a distinguished road
Send a message via Skype™ to sonic6241
Default

what kind of program would you use to do the XML formatting? are they free?
sonic6241 is offline   Reply With Quote
Reply

Bookmarks

Tags
from file, read text, settext, tableview, uilabel

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: 364
7 members and 357 guests
blueorb, fredidf, iAppDeveloper, iGamesDev, mottdog, sacha1996, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

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