Skip to content

Commit 86c80c6

Browse files
authored
Merge pull request #48 from sochalewski/master
Update API to fix behavior in iOS 13
2 parents 9fed073 + 8ae5a13 commit 86c80c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

THLabel/THLabel.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ - (void)drawRect:(CGRect)rect {
426426

427427
- (CTFrameRef)frameRefFromSize:(CGSize)size textRectOutput:(CGRect *)textRectOutput CF_RETURNS_RETAINED {
428428
// Set up font.
429-
CTFontRef fontRef = CTFontCreateWithName((__bridge CFStringRef)self.font.fontName, self.font.pointSize, NULL);
429+
CTFontRef fontRef = CTFontCreateWithFontDescriptor((__bridge CTFontDescriptorRef)self.font.fontDescriptor, self.font.pointSize, NULL);
430430
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0
431431
CTTextAlignment alignment = NSTextAlignmentToCTTextAlignment(self.textAlignment);
432432
#else

0 commit comments

Comments
 (0)