开发者

In-App Mail Account selection

is it possible to have the user开发者_运维百科 select an account from which he wants to send the mail ?

I can send a mail but it's always from the default account and i want the user to be able to select which account he will use to send the email.


If the user taps on the From: address they can switch accounts, this behavior is identical to the normal email composer.

This is the code I'm using to launch the mail composer:

MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];

AssetsLibraryBroker *libraryBroker = [[AssetsLibraryBroker alloc] init];
// loop through selected items;
for (NSString *fileName in [self.selectedDictionary allKeys]) {
    NSLog(@"fileName: %@", fileName);
    [controller addAttachmentData:[libraryBroker getAssetDataForFileName:fileName inManagedObjectContext:managedObjectContext]  mimeType:@"image/jpeg" fileName:[NSString stringWithFormat:@"%@.jpg", fileName]];
}

[libraryBroker release];

[self presentModalViewController:controller animated:YES];
[controller release];

My mail composer has a tap-able "From:" field.

In-App Mail Account selection

In-App Mail Account selection

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜