From c8bcec75c5d7436690cc510e7acfe136cc1574f5 Mon Sep 17 00:00:00 2001 From: Paul Young Date: Thu, 11 Jul 2013 23:20:33 -0400 Subject: Work in progress for #132: Added message preview to iOS example. * Operations are not yet cancelled at any point. * There is a visible delay when the detail text of table cells are updated after a delay as cells are re-used. --- .../ios/iOS UI Test/iOS UI Test/MasterViewController.m | 7 +++++++ .../iOS UI Test/en.lproj/MainStoryboard.storyboard | 15 ++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) 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 5bbc0d53..1b2528d1 100644 --- a/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m +++ b/example/ios/iOS UI Test/iOS UI Test/MasterViewController.m @@ -171,6 +171,13 @@ finishedRefreshWithFetcher:(GTMHTTPFetcher *)fetcher MCOIMAPMessage *message = self.messages[indexPath.row]; cell.textLabel.text = message.header.subject; + + MCOIMAPMessageRenderingOperation * op = [self.imapSession plainTextBodyRenderingOperationWithMessage:message + folder:@"INBOX"]; + + [op start:^(NSString * htmlString, NSError * error) { + cell.detailTextLabel.text = htmlString; + }]; return cell; } diff --git a/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard b/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard index 63190886..ce2aec94 100644 --- a/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard +++ b/example/ios/iOS UI Test/iOS UI Test/en.lproj/MainStoryboard.storyboard @@ -1,5 +1,5 @@ - + @@ -28,20 +28,25 @@ - + - -- cgit v1.2.3