Note that there are some explanatory texts on larger screens.

plurals
  1. POSend Mail TableView NSArray
    primarykey
    data
    text
    <p>This is my NSObject code;</p> <p>Task.h</p> <pre><code>#import &lt;Foundation/Foundation.h&gt; @interface Task : NSObject @property (nonatomic,strong) NSString *name; @property (nonatomic,assign) BOOL done; -(id)initWithName:(NSString *)name done:(BOOL)done; @end </code></pre> <p>Task.m</p> <pre><code>#import "Task.h" @implementation Task @synthesize name = _name; @synthesize done = _done; -(id)initWithName:(NSString *)name done:(BOOL)done { self = [super init]; if (self) { self.name = name; self.done = done; } return self; } </code></pre> <p>This is my send mail code</p> <pre><code>Task *task = [[Task alloc]init]; MFMailComposeViewController *sendmail = [[MFMailComposeViewController alloc]init]; [sendmail setMailComposeDelegate:self]; NSString *message = [_tasks addObject:task]; // Error is here. [sendmail setMessageBody:message isHTML:NO]; [sendmail setSubject:@"Test"]; [self presentViewController:sendmail animated:YES completion:nil]; </code></pre> <p>I don't know, How to do it. I just want to send the list with mail. Where is my mistake? And How can I fix this?</p> <hr> <p>Tasklistviewcontroller.m</p> <pre><code>@synthesize tasks = _tasks; </code></pre> <hr> <p>I am transferring from the tasks table view.</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *NotDoneCellIdentifier = @"NotDoneTaskCell"; static NSString *DoneCellIdentifier = @"DoneTaskCell"; Task *currentTask = [self.tasks objectAtIndex:indexPath.row]; NSString *cellIdentifier = currentTask.done ? DoneCellIdentifier : NotDoneCellIdentifier; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; // Configure the cell... cell.textLabel.text = currentTask.name; return cell; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload