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 11-10-2011, 07:23 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 5
chrisb_1988 is on a distinguished road
Default How do I send an image from a UIViewController to another UIViewController

I have so far created a UIViewController that allows the user to pick a photo from their library or take a photo with the camera.

I now want to take the chosen image and put it into a new UIViewController (UIViewController2) so the user can use some simple tools and graphics to edit the chosen image.

What would be the best way to go about this?

Thanks for any help in advance!
chrisb_1988 is offline   Reply With Quote
Old 11-10-2011, 07:34 AM   #2 (permalink)
Registered Member
 
Join Date: Jul 2010
Location: UK, North East
Posts: 227
zardon is on a distinguished road
Default

Not sure as I've not worked with camera roll.

Some ideas

1. Save the image to your devices documents directory, then delete it when you no longer need to use it

2. In your code clearly define a UIImage that captures the image selected and then you should be able to use this UIImage within your code, and you should be able to pass the UIImage on to other views.

ie:
Code:
SomeVC *s = [[SomeVC alloc] initWithNib....]
[s setImage:thisImage];
Of course the image would need to be set in every view file you want it in.

3. If necessary, you may need to create a singelton, or use app delegate to store the UIImage that is selected.
__________________
UK-based Junior iOS developer looking for a job, or freelance projects.
zardon is offline   Reply With Quote
Old 11-10-2011, 10:44 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2011
Posts: 5
chrisb_1988 is on a distinguished road
Default

Cheers, I'll give this a go and let you know how i get on.
chrisb_1988 is offline   Reply With Quote
Reply

Bookmarks

Tags
image, uiviewcontroller

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: 403
17 members and 386 guests
7twenty7, Alex-alex, Apptronics RBC, baja_yu, chiataytuday, dre, gwelmarten, ipodphone, jeroenkeij, jleannex55, matador1978, mbadegree, n00b, pbart, Retouchable, Sami Gh, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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