pass string to emailbody (iphone) -
Hopefully a simple question for those who know what they are doing ...
I have a string variable with user input text
I then bring an email view based on apple example MailComposerViewController and I want to text the text of the email body.
How can I get string variables in email as simple as possible?
- (zero) displayComposer sheet {
MFMailComposeViewController * picker = [[MFMailComposeViewController alloc] init]; Picker.mailComposeDelegate = self;[picker set topic: @ "subject line"]; // Set up recipients NSArray * toRecipients = [NSArray arrayWithObject: @ "marko@test.com"]; [Picker settingspxients: toRecipients]; // Fill in the e-mail body text NSString * emailBody = @ "Replace with string plz"; [Invoice settingsMessageboard: EmailBody is HTML: No]; [Self current model visual controller: animated picker: yes]; [Picker release];
update :
Project is openFrameworks based
& amp; Trouble seems to me that C ++ & amp; Objective-C
is included in mainApp.h
class mainApp: public ofxiPhoneApp {public: string main text; // Edit it};
in mainApp.mm
zero mainApp :: draw () {// maintext = keyboard-> getText () edit; // edit}
& amp; It all goes fine on the hardware but I have lost it completely
Update 2 :
Still can not do that ' Accessor (gator) method '
When I can now convert the user input string to NSString
The bit I cant cant speak is that it does not have any main computing distributor file How to pass the code in the crash
NSString * fred = myApp- & gt; Main text;
Mark
I also I'm a newbie and had a lot of trouble with it, this tutorial really explained this ...
Comments
Post a Comment