From f789d411c42d14ab9403470b06dc2c8b905018c3 Mon Sep 17 00:00:00 2001 From: Paul Young Date: Sun, 14 Jul 2013 23:36:39 -0400 Subject: Added prepareForReuse * Moved cancellation of rendering operation and resetting of subtitle. --- example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m | 6 ++++++ example/ios/iOS UI Test/iOS UI Test/MasterViewController.m | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'example') diff --git a/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m index 21d22e38..bf0df5fb 100644 --- a/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m +++ b/example/ios/iOS UI Test/iOS UI Test/MCTTableViewCell.m @@ -10,4 +10,10 @@ @implementation MCTTableViewCell +- (void)prepareForReuse +{ + [self.messageRenderingOperation cancel]; + self.detailTextLabel.text = @" "; +} + @end diff --git a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m index 9e6f49df..b6a2206e 100644 --- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m +++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m @@ -169,12 +169,9 @@ finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { MCTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; - [cell.messageRenderingOperation cancel]; - cell.detailTextLabel.text = @" "; - MCOIMAPMessage *message = self.messages[indexPath.row]; - cell.textLabel.text = message.header.subject; + cell.textLabel.text = message.header.subject; cell.messageRenderingOperation = [self.imapSession plainTextBodyRenderingOperationWithMessage:message folder:@"INBOX"]; -- cgit v1.2.3