Skip to content

Commit

Permalink
Merge branch 'funnel20-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismiles committed Feb 1, 2015
2 parents 5f4ef18 + 232ae7c commit 175d089
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CMPopTipView/CMPopTipView.m
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ - (void)drawRect:(__unused CGRect)rect
if ([self.title respondsToSelector:@selector(drawWithRect:options:attributes:context:)]) {
NSMutableParagraphStyle *titleParagraphStyle = [[NSMutableParagraphStyle alloc] init];
titleParagraphStyle.alignment = self.titleAlignment;
titleParagraphStyle.lineBreakMode = NSLineBreakByClipping;
titleParagraphStyle.lineBreakMode = NSLineBreakByWordWrapping;

[self.title drawWithRect:titleFrame
options:NSStringDrawingUsesLineFragmentOrigin
Expand All @@ -276,7 +276,7 @@ - (void)drawRect:(__unused CGRect)rect

[self.title drawInRect:titleFrame
withFont:self.titleFont
lineBreakMode:NSLineBreakByClipping
lineBreakMode:NSLineBreakByWordWrapping
alignment:self.titleAlignment];

#pragma clang diagnostic pop
Expand All @@ -293,10 +293,10 @@ - (void)drawRect:(__unused CGRect)rect

if ([self.title respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) {
NSMutableParagraphStyle *titleParagraphStyle = [[NSMutableParagraphStyle alloc] init];
titleParagraphStyle.lineBreakMode = NSLineBreakByClipping;
titleParagraphStyle.lineBreakMode = NSLineBreakByWordWrapping;

textFrame.origin.y += [self.title boundingRectWithSize:CGSizeMake(textFrame.size.width, 99999.0)
options:kNilOptions
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{
NSFontAttributeName: self.titleFont,
NSParagraphStyleAttributeName: titleParagraphStyle
Expand All @@ -310,7 +310,7 @@ - (void)drawRect:(__unused CGRect)rect

textFrame.origin.y += [self.title sizeWithFont:self.titleFont
constrainedToSize:CGSizeMake(textFrame.size.width, 99999.0)
lineBreakMode:NSLineBreakByClipping].height;
lineBreakMode:NSLineBreakByWordWrapping].height;

#pragma clang diagnostic pop

Expand Down Expand Up @@ -432,10 +432,10 @@ - (void)presentPointingAtView:(UIView *)targetView inView:(UIView *)containerVie

if ([self.title respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) {
NSMutableParagraphStyle *titleParagraphStyle = [[NSMutableParagraphStyle alloc] init];
titleParagraphStyle.lineBreakMode = NSLineBreakByClipping;
titleParagraphStyle.lineBreakMode = NSLineBreakByWordWrapping;

titleSize = [self.title boundingRectWithSize:CGSizeMake(rectWidth, 99999.0)
options:kNilOptions
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{
NSFontAttributeName: self.titleFont,
NSParagraphStyleAttributeName: titleParagraphStyle
Expand All @@ -449,7 +449,7 @@ - (void)presentPointingAtView:(UIView *)targetView inView:(UIView *)containerVie

titleSize = [self.title sizeWithFont:self.titleFont
constrainedToSize:CGSizeMake(rectWidth, 99999.0)
lineBreakMode:NSLineBreakByClipping];
lineBreakMode:NSLineBreakByWordWrapping];

#pragma clang diagnostic pop

Expand Down

0 comments on commit 175d089

Please sign in to comment.