diff options
author | Paul Young <paulyoungonline@gmail.com> | 2013-07-11 23:20:33 -0400 |
---|---|---|
committer | Paul Young <paulyoungonline@gmail.com> | 2013-07-11 23:23:58 -0400 |
commit | c8bcec75c5d7436690cc510e7acfe136cc1574f5 (patch) | |
tree | f22c7ef226956cd7ca09ceaa88591d6d909ad64a /example | |
parent | b5b6994719153fe7b1c8503ef94c6971b10a5e14 (diff) |
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.
Diffstat (limited to 'example')
-rw-r--r-- | example/ios/iOS UI Test/iOS UI Test/MasterViewController.m | 7 | ||||
-rw-r--r-- | example/ios/iOS UI Test/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 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C3012" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="3"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="3"> <dependencies> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/> </dependencies> @@ -28,20 +28,25 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <prototypes> - <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="phq-AM-6qj" style="IBUITableViewCellStyleDefault" id="lJ0-d7-vTF"> + <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="phq-AM-6qj" detailTextLabel="Lya-Aj-7bQ" style="IBUITableViewCellStyleSubtitle" id="lJ0-d7-vTF"> <rect key="frame" x="0.0" y="22" width="320" height="44"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <rect key="frame" x="0.0" y="0.0" width="300" height="43"/> <autoresizingMask key="autoresizingMask"/> <subviews> - <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="phq-AM-6qj"> - <rect key="frame" x="10" y="0.0" width="280" height="43"/> + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="phq-AM-6qj"> + <rect key="frame" x="10" y="2" width="38" height="22"/> <autoresizingMask key="autoresizingMask"/> - <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/> <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> </label> + <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lya-Aj-7bQ"> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/> + <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> + </label> </subviews> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </view> |