objective c - MFMailComposeViewController rotation -


details - - ios - 4.2, xcode - 3.2.5, device - ipad 2, platform - openframeworks

i'm using mfmailcomposeviewcontroller email screengrab attachment. it's working fine i'm having issues rotation.

my mfmailcomposeviewcontroller added viewcontroller panel resides @ top of screen each orientation. result, mfmailcomposeviewcontroller appears in correct orientation perfect. problem appears when cancel button pressed. options appear if orientation portrait. image taken when viewed in landscape.

http://augmatic.co.uk/store/ipad_email_rotation.jpg

here code:

uiimage* screengrab = app->visualsmanager->getscreengrab();  mfmailcomposeviewcontroller *picker = [[mfmailcomposeviewcontroller alloc] init]; picker.mailcomposedelegate = self; picker.modalpresentationstyle = uimodalpresentationfullscreen;  [picker setsubject:@"check out image!"]; nsarray *torecipients = [nsarray arraywithobject:@"test@email.com"];  [picker settorecipients:torecipients]; nsdata *mydata = uiimagepngrepresentation(screengrab); [picker addattachmentdata:mydata mimetype:@"image/png" filename:@"image.png"];   nsstring *emailbody = @"check out image made"; [picker setmessagebody:emailbody ishtml:no]; [self presentmodalviewcontroller:picker animated:yes]; [picker release]; 

any ideas?

also, image i'm attaching portrait, though specify orientation when make it:

uiimage *image = [[uiimage alloc] initwithcgimage:imageref scale:scale orientation:orientation]; 

when use same technique save images photo library orientation set perfectly, not when added email attachment.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -