UA-17470720-3

Jump to content


Photo
- - - - -

MFMailComposer Email Results From Core Data


  • Please log in to reply
No replies to this topic

#1 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 139 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 06 December 2017 - 09:05 AM

Core data functions nicely. What might be a code snippet to reference the results of the core data and insert into MFMailComposeViewController directly inline (not as an attachment) using isHTML:Yes... I have used this code in another app and it plays nicely, but it is using literal strings...

 

NSString *emailBody = [NSString stringWithFormat:@"<p>Stats...</p>

<p><b>Laps Completed: %@</b></p><p>Goal: %@ laps</p>
<p>Time To Complete: %@ (h:m:s)</p>
<p>%f&#37 completion ratio</p>",
self.lapLabel.text, self.goal.text, self.timeLabel.text,
(self.percentageDoughnut.percentage)*100];


[mail setMessageBody:emailBody isHTML:YES];

 

I have tried the following code, but the result is blank... (no error, but a "blank info" area in email composer)

 

NSString *emailBody = [NSString stringWithFormat:@"<p>Stats...</p><p><b>Related Tasks: %@ %@</b></p>", self.tableViewModel.tableView, self.tableViewModel = [self loadPlantsModel]];

 

 

 

 


Edited by designwerks, 06 December 2017 - 09:32 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users