Skip to content

Commit

Permalink
Updated to version 1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Dec 18, 2013
1 parent b1a719c commit 8964e83
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
THLabel

Version 1.1.6, November 21st, 2013
Version 1.1.7, December 18th, 2013

Copyright (c) 2013 Tobias Hagemann, tobiha.de

Expand Down
4 changes: 4 additions & 0 deletions RELEASE NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 1.1.7

- Fixed drawing, when frame is too small.

Version 1.1.6

- Fixed memory related crash.
Expand Down
2 changes: 1 addition & 1 deletion THLabel.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'THLabel'
s.version = '1.1.6'
s.version = '1.1.7'
s.summary = 'THLabel is a subclass of UILabel, which additionally allows shadow blur, stroke text and fill gradient.'
s.homepage = 'https://github.com/MuscleRumble/THLabel'
s.screenshots = 'https://github.com/MuscleRumble/THLabel/blob/master/screenshot.png'
Expand Down
2 changes: 1 addition & 1 deletion THLabel/THLabel.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// THLabel.h
//
// Version 1.1.6
// Version 1.1.7
//
// Created by Tobias Hagemann on 11/25/12.
// Copyright (c) 2013 tobiha.de. All rights reserved.
Expand Down
9 changes: 6 additions & 3 deletions THLabel/THLabel.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// THLabel.m
//
// Version 1.1.6
// Version 1.1.7
//
// Created by Tobias Hagemann on 11/25/12.
// Copyright (c) 2013 tobiha.de. All rights reserved.
Expand Down Expand Up @@ -383,8 +383,11 @@ - (CGRect)contentRectFromBounds:(CGRect)bounds withInsets:(UIEdgeInsets)insets {
}

- (CGRect)textRectFromContentRect:(CGRect)contentRect framesetterRef:(CTFramesetterRef)framesetterRef {
CGRect textRect = contentRect;
textRect.size = CTFramesetterSuggestFrameSizeWithConstraints(framesetterRef, CFRangeMake(0, [self.text length]), NULL, contentRect.size, NULL);
CGSize suggestedTextRectSize = CTFramesetterSuggestFrameSizeWithConstraints(framesetterRef, CFRangeMake(0, [self.text length]), NULL, contentRect.size, NULL);
if (CGSizeEqualToSize(suggestedTextRectSize, CGSizeZero)) {
suggestedTextRectSize = CTFramesetterSuggestFrameSizeWithConstraints(framesetterRef, CFRangeMake(0, [self.text length]), NULL, CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX), NULL);
}
CGRect textRect = CGRectMake(0.0, 0.0, suggestedTextRectSize.width, suggestedTextRectSize.height);

// Horizontal alignment.
switch (self.textAlignment) {
Expand Down

0 comments on commit 8964e83

Please sign in to comment.