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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 12-20-2008, 02:26 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Ireland
Age: 21
Posts: 472
Default Calling two parts of an array

Hey guys,

I'm trying to set the text property of a textview via a call. It looks like this:

Code:
	[self.raceView.raceDescription setText:[races description]];
I also want to call [races winner] and for the textview to then display the description and winner. How to I call both?
__________________
On the iOS App Store
kieran12 is offline   Reply With Quote
Old 12-20-2008, 02:38 PM   #2 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,122
Default

What does this have to do with an array?

Anyway, why not append the to strings together first, then set that in the textview.

Code:
NSString *text = [NSString stringWithFormat:@"Winner: %@\nDescription: %@", [race winner], [race description]];
[self.raceView.raceDescription setText:text];
Is that what you are trying to do? Your question is a bit confusing.
RickMaddy is offline   Reply With Quote
Old 12-20-2008, 02:43 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Ireland
Age: 21
Posts: 472
Default

Yeh sorry about the messy question. I mentioned array because that is where description and winner are stored.

Thanks though your solution worked perfectly. I never thought of appending them into one string.

Anyway, thankyou
__________________
On the iOS App Store
kieran12 is offline   Reply With Quote
Reply

Bookmarks

Tags
array, call

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: 348
20 members and 328 guests
ADY, Dani77, e2applets, Herbie, JasonR, keeshux, linkmx, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

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