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-09-2011, 07:58 AM   #1 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default Add multiple objects to the same index in NSMutable array?

Is it possible to add multiple Objects to the same index in NSMutable array? For example, I have an array that populates a UITableView. The array needs to contain both the title of the cell (I've made a custom cell that allows the user to title the cell to their liking) and a float value. Basically, the user clicks on the cell and is taken to another view where they can input that float value that needs to be stored in the array along with the name of the cell, so I can recall both of these easily if the user quits the app. Help would be appreciated. Thanks.
Whitehk is offline   Reply With Quote
Old 05-09-2011, 08:00 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

yes, you can set an array to be in an index, so you will have an array of array.
__________________
dany_dev is offline   Reply With Quote
Old 05-09-2011, 08:20 AM   #3 (permalink)
Registered Member
 
simplyDusty's Avatar
 
Join Date: Jan 2011
Posts: 158
simplyDusty is on a distinguished road
Default

It would probably be a better design to create a new class that contains two variables, your title and float value. Then just add your new class objects to your NSMutableArray. That way, you won't get stuck dealing with an array of arrays.
simplyDusty is offline   Reply With Quote
Reply

Bookmarks

Tags
index, nsmutable array, objects, uitableview, uitableview cell

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: 351
9 members and 342 guests
dansparrow, iOS.Lover, lorrettaui53, MikaelBartlett, 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:57 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0