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 09-10-2011, 10:36 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default sharing data between views

So I've got a firstViewController with a tabBarController and within that a navigationController.
On that navigation controller is a button calling a method that loads a MFMailComposer.

In my secondViewController I have a NSMutableArray in a tableView created by a custom cell class. Which is being loaded in the navigationController of my firstViewController.

In the didSelectRowAtIndexPoint method of my secondViewController I'm storing the selected cells in the NSMutableArray.

Now, when the MFMailComposer loads (in the firstViewController) I want to add the objects in my NSMutableArray (from my secondViewController) to the messageBody.

How do I in the best way share the data in my NSMutableArray with another NSMutableArray in my firstViewController so that I can load the objects in the messageBody?

Thanks you for any help!
thehindutimes is offline   Reply With Quote
Old 09-10-2011, 12:17 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default

And how are you helpful?
thehindutimes is offline   Reply With Quote
Old 09-10-2011, 12:35 PM   #3 (permalink)
Token farm animal
 
sneaky's Avatar
 
Join Date: Apr 2011
Posts: 321
sneaky is on a distinguished road
Default

Quote:
Originally Posted by KAMRANe View Post
Thank you for the very great and informative post.i expected more information.
No no, thank YOU. Your contribution to this thread exceeded our wildest expectations.

For op, you will either have to look in to implementing a delegate protocol or set up a singleton class for sharing information between objects. If you check the tutorials section of this forum there are threads there for either approach.
sneaky is offline   Reply With Quote
Old 09-10-2011, 12:42 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default

thank you!
thehindutimes is offline   Reply With Quote
Reply

Bookmarks

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: 413
9 members and 404 guests
apatsufas, Eclectic, fiftysixty, JackReidy, teebee74, tim0504, UMAD, yomo710, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

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