how can i use mailComposer in iPad as well as iPhone? -


i have implemented mail composer iphone , it's working fine want use mail composer in ipad should change or please guide me how can implement mail composer in ipad?if possible please give me sample code that.thanks in advance..

hi!i have implemented code , can implement writing below code:

mfmailcomposeviewcontroller *mailcontroller = [[mfmailcomposeviewcontroller alloc] init];

mailcontroller.mailcomposedelegate = self;  mailcontroller.modalpresentationstyle = uimodalpresentationfullscreen; [mailcontroller setsubject:@"hello iphone"]; [mailcontroller setmessagebody:@"please find attachment...." ishtml:no]; mydata = [[nsdata alloc] initwithcontentsofurl:[nsurl urlwithstring:[imgurl objectatindex:offsetx]]]; 

uiimage *pic = [[uiimage alloc] initwithdata:mydata];

nsdata *exportdata = uiimagejpegrepresentation(pic ,1.0); [mailcontroller addattachmentdata:exportdata mimetype:@"image/jpeg" filename:@"picture.jpeg"];  [self presentmodalviewcontroller:mailcontroller animated:no]; [mailcontroller release]; 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -