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 Tutorials > Tutorial Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 08-26-2010, 11:33 AM   #1 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 13
Default email and save

If anyone knows , I wonder what's the best method to save a picture on your iphone and also email it to someone from an image gallery.
Thanks in advance
ftwhere is offline   Reply With Quote
Old 09-04-2010, 05:51 AM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 13
Default

so i got this scrollview gallery working and i want to be able to send the pictures by email, but it's only working for the image i setup ...how can i make it work for each of the images .... the code looks like this:
- (void)viewDidLoad
{
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
[scrollView setCanCancelContentTouches:NO];
scrollView.clipsToBounds = YES;
scrollView.scrollEnabled = YES;
scrollView.pagingEnabled = YES;
scrollView.showsHorizontalScrollIndicator = NO;

NSUInteger i;
for (i = 1; i <= kNumImages; i++)
{
NSString *imageName = [NSString stringWithFormat:@"item%d.png", i];
UIImage *image = [UIImage imageNamed:imageName];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];


CGRect rect = imageView.frame;
rect.size.height = kScrollObjHeight;
rect.size.width = kScrollObjWidth;
imageView.frame = rect;
imageView.tag = i;
[scrollView addSubview:imageView];
[imageView release];
}
[self layoutScrollImages];
}

................

and the attachment code:

NSString *path = [[NSBundle mainBundle] pathForResource:@"item1" ofType:@"png"];
NSData *myData = [NSData dataWithContentsOfFileath];
[MailComposer addAttachmentData:myData mimeType:@"image/png" fileName:@"item1"];

so what I want is instead of using item1 to be able to use the image that is displayed at the moment...


any ideas?

Last edited by ftwhere; 09-04-2010 at 05:55 AM.
ftwhere 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: 274
20 members and 254 guests
ADY, apatsufas, ckgni, dacapo, Dani77, Fritzer, ghost, HDshot, headkaze, jakerocheleau, joeallenpro, masc2279, mer10, MozyMac, mystic.purple, objch, Rudy, themathminister, timle8n1, Zool
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,878
Threads: 89,223
Posts: 380,731
Top Poster: BrianSlick (7,129)
Welcome to our newest member, olga2000
Powered by vBadvanced CMPS v3.1.0

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