Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using DTCoreText to render post body

  • Loading branch information...
commit 1ed1e7777ceb4968cb444fd75e7c26e64eb7824a 1 parent 885df0d
@winfield authored
View
1  Podfile
@@ -2,3 +2,4 @@ platform :ios
pod 'AFNetworking'
pod 'PullToRefresh'
pod 'SVProgressHUD'
+pod 'DTCoreText', '~> 1.0.1'
View
2  Podfile.lock
@@ -1,9 +1,11 @@
PODS:
- AFNetworking (1.0RC1)
+ - DTCoreText (1.0.1)
- PullToRefresh (0.0.1)
- SVProgressHUD (0.7)
DEPENDENCIES:
- AFNetworking
+ - DTCoreText (~> 1.0.1)
- PullToRefresh
- SVProgressHUD
View
79 Ruby China/RCITopicDetailViewController.m
@@ -9,6 +9,8 @@
#import "RCITopicDetailViewController.h"
#import "AFNetworking.h"
#import "SVProgressHUD.h"
+#import "DTCoreText.h"
+#import "DTAttributedTextView.h"
NSString *const RCITopicBaseUrlString = @"http://ruby-china.org/api/topics/";
@@ -56,7 +58,31 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
}
}
+- (NSAttributedString *)attributedStringFromHtml:(NSString *)htmlBodyString
+{
+ NSData *htmlBodyData = [htmlBodyString dataUsingEncoding:NSUTF8StringEncoding];
+
+ // Create attributed string from HTML
+ CGSize maxImageSize = CGSizeMake(self.view.bounds.size.width - 20.0, self.view.bounds.size.height - 20.0);
+
+ NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithFloat:1.0], NSTextSizeMultiplierDocumentOption, [NSValue valueWithCGSize:maxImageSize], DTMaxImageSize,
+ @"Times New Roman", DTDefaultFontFamily, @"purple", DTDefaultLinkColor, nil];
+
+ NSAttributedString *string = [[NSAttributedString alloc] initWithHTML:htmlBodyData options:options documentAttributes:NULL];
+
+ return string;
+}
+
#pragma mark - UITableViewDataSource
+- (void)setBodyHtmlView:(UITableViewCell *)cell attributedHtmlString:(NSAttributedString *)attributedHtmlString
+{
+ DTAttributedTextView *bodyView = (DTAttributedTextView *)[cell viewWithTag:105];
+ bodyView.contentView.edgeInsets = UIEdgeInsetsMake(10, 10, 10, 10);
+ bodyView.attributedString = attributedHtmlString;
+ bodyView.scrollEnabled = NO;
+ [bodyView setShowsHorizontalScrollIndicator:NO];
+ [bodyView setShowsVerticalScrollIndicator:NO];
+}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
@@ -78,14 +104,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UILabel *countLabel = (UILabel *)[topicDetailCell viewWithTag:104];
countLabel.text = [[self.topicDetail objectForKey:@"replies_count"] stringValue];
- UILabel *bodyLabel = (UILabel *)[topicDetailCell viewWithTag:105];
- NSString *bodyString = [self.topicDetail objectForKey:@"body"];
- CGSize expectedLabelSize = [self labelSize:@"Topic Detail" withLabelTag:105 withBodyString:bodyString];
- //adjust the label the the new height.
- CGRect newFrame = bodyLabel.frame;
- newFrame.size.height = expectedLabelSize.height + 90.0f;
- bodyLabel.frame = newFrame;
- bodyLabel.text = bodyString;
+ NSString *htmlBodyString = [self.topicDetail objectForKey:@"body_html"];
+ NSAttributedString *attributedHtmlString = [self attributedStringFromHtml:htmlBodyString];
+ [self setBodyHtmlView:topicDetailCell attributedHtmlString:attributedHtmlString];
UIImageView *imageView = (UIImageView *)[topicDetailCell viewWithTag:106];
NSURL *gravatarUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://gravatar.com/avatar/%@.png?s=40", [[self.topicDetail objectForKey:@"user"] objectForKey:@"gravatar_hash"]]];
@@ -107,34 +128,42 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UILabel *countLabel = (UILabel *)[topicReplyCell viewWithTag:104];
countLabel.text = [[topicReply objectForKey:@"replies_count"] stringValue];
- UILabel *bodyLabel = (UILabel *)[topicReplyCell viewWithTag:105];
- NSString *bodyString = [topicReply objectForKey:@"body"];
- CGSize expectedLabelSize = [self labelSize:@"Reply" withLabelTag:105 withBodyString:bodyString];
- //adjust the label the the new height.
- CGRect newFrame = bodyLabel.frame;
- newFrame.size.height = expectedLabelSize.height + 30.0f;
- bodyLabel.frame = newFrame;
- bodyLabel.text = bodyString;
+ NSString *htmlBodyString = [topicReply objectForKey:@"body_html"];
+ NSAttributedString *attributedHtmlString = [self attributedStringFromHtml:htmlBodyString];
+ [self setBodyHtmlView:topicReplyCell attributedHtmlString:attributedHtmlString];
UIImageView *imageView = (UIImageView *)[topicReplyCell viewWithTag:106];
- NSURL *gravatarUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://gravatar.com/avatar/%@.png?s=40", [[topicReply objectForKey:@"user"] objectForKey:@"gravatar_hash"]]];
+ NSURL *gravatarUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://gravatar.com/avatar/%@.png?s=46", [[topicReply objectForKey:@"user"] objectForKey:@"gravatar_hash"]]];
[imageView setImageWithURL:gravatarUrl placeholderImage:[UIImage imageNamed:@"userPlaceHolder.png"]];
return topicReplyCell;
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+ CGFloat contentWidth = tableView.frame.size.width;
+ CGFloat height = 0.0f;
+
if (indexPath.row == 0) {
- NSString *bodyString = [self.topicDetail objectForKey:@"body"];
- NSString *titleString = [self.topicDetail objectForKey:@"title"];
- CGSize titleLabelSize = [self labelSize:@"Topic Detail" withLabelTag:101 withBodyString:titleString];
- CGSize bodyLabelSize = [self labelSize:@"Topic Detail" withLabelTag:105 withBodyString:bodyString];
- return titleLabelSize.height + bodyLabelSize.height + 160.0f;
+ NSString *htmlBodyString = [self.topicDetail objectForKey:@"body_html"];
+ NSAttributedString *attributedHtmlString = [self attributedStringFromHtml:htmlBodyString];
+ DTAttributedTextContentView *contentView = [[DTAttributedTextContentView alloc] initWithAttributedString:attributedHtmlString width:contentWidth];
+ CGSize expectedSize = [contentView suggestedFrameSizeToFitEntireStringConstraintedToWidth:contentWidth];
+ height = expectedSize.height;
} else {
- NSString *bodyString = [[self.topicReplies objectAtIndex:(indexPath.row-1)] objectForKey:@"body"];
- CGSize bodyLabelSize = [self labelSize:@"Reply" withLabelTag:105 withBodyString:bodyString];
- return bodyLabelSize.height + 85.0f;
+ NSString *htmlBodyString = [[self.topicReplies objectAtIndex:(indexPath.row-1)] objectForKey:@"body_html"];
+ NSAttributedString *attributedHtmlString = [self attributedStringFromHtml:htmlBodyString];
+ DTAttributedTextContentView *contentView = [[DTAttributedTextContentView alloc] initWithAttributedString:attributedHtmlString width:contentWidth];
+ CGSize expectedSize = [contentView suggestedFrameSizeToFitEntireStringConstraintedToWidth:contentWidth];
+ height = expectedSize.height;
}
+
+ if (height < 180.0f) {
+ height += 130.0f;
+ } else {
+ height += 155.0f;
+ }
+
+ return height;
}
- (CGSize)labelSize:(NSString *)cellIdentifier withLabelTag:(NSInteger)tag withBodyString:(NSString *)bodyString
View
104 Ruby China/en.lproj/MainStoryboard_iPhone.storyboard
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11E53" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="M3P-kl-mEF">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2549" systemVersion="12A269" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="M3P-kl-mEF">
<dependencies>
<deployment defaultVersion="1296" identifier="iOS"/>
- <development defaultVersion="4200" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1498"/>
</dependencies>
<scenes>
<!--Topics View Controller - Topics-->
@@ -11,38 +10,38 @@
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
<viewController id="2" customClass="RCITopicsViewController" sceneMemberID="viewController">
- <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="69" sectionHeaderHeight="22" sectionFooterHeight="22" id="p9L-iJ-y4w">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="87" sectionHeaderHeight="22" sectionFooterHeight="22" id="p9L-iJ-y4w">
<rect key="frame" x="0.0" y="64" width="320" height="416"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" 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="Topic Summary" rowHeight="69" id="qRX-Z2-oP2">
- <rect key="frame" x="0.0" y="22" width="320" height="69"/>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Topic Summary" rowHeight="87" id="qRX-Z2-oP2">
+ <rect key="frame" x="0.0" y="22" width="320" height="87"/>
<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="68"/>
+ <rect key="frame" x="0.0" y="0.0" width="320" height="86"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="106" contentMode="scaleToFill" id="hAk-tK-7Ez">
- <rect key="frame" x="20" y="14" width="40" height="40"/>
+ <rect key="frame" x="14" y="20" width="46" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="101" contentMode="left" text="I know how this game is played" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="10" id="5rK-h6-LfE">
- <rect key="frame" x="68" y="19" width="232" height="29"/>
+ <rect key="frame" x="68" y="37" width="252" height="29"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="STHeitiSC-Medium" family="Heiti SC" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="102" contentMode="left" text="Tyrion Lannister" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" id="n0D-wv-r8J">
- <rect key="frame" x="68" y="3" width="84" height="14"/>
+ <rect key="frame" x="68" y="20" width="84" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="103" contentMode="left" text="Game of Thrones" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" id="31i-7y-iKM">
- <rect key="frame" x="193" y="52" width="87" height="14"/>
+ <rect key="frame" x="213" y="20" width="87" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -52,31 +51,6 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Topic Summary" textLabel="RWI-NJ-arU" detailTextLabel="Jy5-jv-f87" rowHeight="69" style="IBUITableViewCellStyleValue1" id="qvL-td-uel">
- <rect key="frame" x="0.0" y="91" width="320" height="69"/>
- <autoresizingMask key="autoresizingMask"/>
- <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
- <rect key="frame" x="0.0" y="0.0" width="320" height="68"/>
- <autoresizingMask key="autoresizingMask"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" id="RWI-NJ-arU">
- <rect key="frame" x="10" y="24" width="35" height="21"/>
- <autoresizingMask key="autoresizingMask"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
- <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="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" id="Jy5-jv-f87">
- <rect key="frame" x="266" y="24" width="44" height="21"/>
- <autoresizingMask key="autoresizingMask"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" red="0.2196078431372549" green="0.32941176470588235" blue="0.52941176470588236" 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>
- </tableViewCell>
</prototypes>
<sections/>
</tableView>
@@ -99,77 +73,70 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Topic Detail" rowHeight="221" id="huc-nr-RNJ">
- <rect key="frame" x="0.0" y="22" width="320" height="221"/>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Topic Detail" rowHeight="184" id="huc-nr-RNJ">
+ <rect key="frame" x="0.0" y="22" width="320" height="184"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
- <rect key="frame" x="0.0" y="0.0" width="320" height="220"/>
+ <rect key="frame" x="0.0" y="0.0" width="320" height="183"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="106" contentMode="scaleToFill" id="4sB-7x-P80">
- <rect key="frame" x="20" y="11" width="40" height="40"/>
+ <rect key="frame" x="20" y="20" width="46" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="102" contentMode="left" text="Tyrion Lannister" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" id="iPl-3q-duG">
- <rect key="frame" x="68" y="11" width="84" height="14"/>
+ <rect key="frame" x="74" y="20" width="84" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="101" contentMode="left" text="I know how this game is played" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="10" id="uo2-La-Mky">
- <rect key="frame" x="68" y="33" width="232" height="29"/>
+ <rect key="frame" x="74" y="37" width="232" height="29"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="STHeitiSC-Medium" family="Heiti SC" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="103" contentMode="left" text="Game of Thrones" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" id="BGV-tG-sRJ">
- <rect key="frame" x="213" y="11" width="87" height="14"/>
+ <rect key="frame" x="213" y="20" width="87" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="105" contentMode="left" lineBreakMode="wordWrap" numberOfLines="0" minimumFontSize="10" id="fgZ-h4-uJg">
- <rect key="frame" x="68" y="70" width="232" height="130"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <string key="text">The War of the Five Kings in Westeros seems to be winding down. In the North, King Stannis Baratheon has installed himself at the Wall and attempts to win the support of the northmen. This is complicated by the fact that the Lannisters have installed Roose Bolton of House Bolton (loyal to the Iron Throne) as Warden of the North, and much of the west coast is under occupation by the Ironborn. On the advice of Jon Snow, Stannis seeks and receives the support of the hill clans and captures Deepwood Motte from Asha Greyjoy. He then chooses to march south to confront the Boltons at Winterfell, but his army becomes snowbound.
-On the Wall itself, Jon Snow has been elected the 998th Lord Commander of the Night's Watch, but the young man has enemies both in the Watch and beyond the Wall. After making a peace with the wildlings, he lets them through in large numbers to reinforce the Wall against the Others. The Red Priestess Melisandre shares many of her visions with Jon, telling him repeatedly that he has enemies in the Watch and warning him of daggers in the dark. Her prophecy comes to fruition when Jon is attacked by his Brothers and stabbed several times. The narrative closes with Jon losing consciousness.</string>
- <fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="12"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </label>
+ <view tag="105" contentMode="scaleToFill" id="vIU-bZ-Xf1" customClass="DTAttributedTextView">
+ <rect key="frame" x="20" y="74" width="280" height="89"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCell>
- <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Reply" rowHeight="153" id="HpP-gi-MCo">
- <rect key="frame" x="0.0" y="243" width="320" height="153"/>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Reply" rowHeight="184" id="HpP-gi-MCo">
+ <rect key="frame" x="0.0" y="206" width="320" height="184"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
- <rect key="frame" x="0.0" y="0.0" width="320" height="152"/>
+ <rect key="frame" x="0.0" y="0.0" width="320" height="183"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="106" contentMode="scaleToFill" id="2pv-5D-msB">
- <rect key="frame" x="20" y="20" width="40" height="40"/>
+ <rect key="frame" x="20" y="20" width="46" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="102" contentMode="left" text="Arya Stark" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumFontSize="10" id="Dau-Wm-n6j">
- <rect key="frame" x="68" y="20" width="84" height="14"/>
+ <rect key="frame" x="74" y="20" width="84" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="105" contentMode="left" lineBreakMode="characterWrap" numberOfLines="0" minimumFontSize="10" id="rpJ-hs-0KX">
- <rect key="frame" x="68" y="42" width="232" height="90"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <string key="text">She is left-handed, quick and dexterous. She is a warg, entering her direwolf Nymeria in her dreams and cats in Braavos. She has learned basic swordplay in the Braavosi Water Dancer tradition and knows how to use knives. She received a noble's education, and is said to be good with mathematics and an excellent horse rider. She has proved to know at least a bit of High Valyrian. She also speaks Braavosi with a strong accent and has put some effort into learning the language, under orders from the Kindly Man. She has a quick and curious mind and a pragmatic outlook.</string>
- <fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="12"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- </label>
+ <view tag="105" contentMode="scaleToFill" id="aAR-zs-nVq" customClass="DTAttributedTextView">
+ <rect key="frame" x="20" y="74" width="280" height="89"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
@@ -208,6 +175,13 @@ On the Wall itself, Jon Snow has been elected the 998th Lord Commander of the Ni
</scene>
</scenes>
<classes>
+ <class className="DTAttributedTextView" superclassName="UIScrollView">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/DTAttributedTextView.h"/>
+ <relationships>
+ <relationship kind="outlet" name="backgroundView" candidateClass="UIView"/>
+ <relationship kind="outlet" name="textDelegate"/>
+ </relationships>
+ </class>
<class className="PullRefreshTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/PullRefreshTableViewController.h"/>
</class>
View
BIN  Ruby China/userPlaceHolder.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.