Skip to content

Commit

Permalink
Update example to iOS 8 deployment target
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed May 9, 2016
1 parent 356ce9a commit d04ba7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Example/AttributedTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
self.summaryLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero];
self.summaryLabel.font = [UIFont systemFontOfSize:kEspressoDescriptionTextFontSize];
self.summaryLabel.textColor = [UIColor darkGrayColor];
self.summaryLabel.lineBreakMode = UILineBreakModeWordWrap;
self.summaryLabel.lineBreakMode = NSLineBreakByWordWrapping;
self.summaryLabel.numberOfLines = 0;
self.summaryLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:(__bridge NSString *)kCTUnderlineStyleAttributeName];

Expand Down Expand Up @@ -142,7 +142,10 @@ + (CGFloat)heightForCellWithText:(NSString *)text availableWidth:(CGFloat)availa

UIFont *systemFont = [UIFont systemFontOfSize:kEspressoDescriptionTextFontSize];
CGSize textSize = CGSizeMake(availableWidth - (2 * padding) - 26, CGFLOAT_MAX); // rough accessory size
CGSize sizeWithFont = [text sizeWithFont:systemFont constrainedToSize:textSize lineBreakMode:NSLineBreakByWordWrapping];
NSDictionary *attributes = @{
NSFontAttributeName : systemFont,
};
CGSize sizeWithFont = [text boundingRectWithSize:textSize options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size;

#if defined(__LP64__) && __LP64__
return ceil(sizeWithFont.height) + padding;
Expand Down
4 changes: 2 additions & 2 deletions Example/Espressos.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -586,7 +586,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
};
Expand Down

0 comments on commit d04ba7c

Please sign in to comment.