TTRangeSlider icon indicating copy to clipboard operation
TTRangeSlider copied to clipboard

CoreText note

Open GarthGit opened this issue 4 years ago • 3 comments

CoreText note: Client requested name ".SFUI-Regular", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].

GarthGit avatar Dec 09 '20 09:12 GarthGit

-(void)setMinLabelFont:(UIFont *)minLabelFont{ _minLabelFont = minLabelFont; if ([_minLabelFont.fontName isEqualToString:@".SFUI-Regular"]) { self.minLabel.font = (__bridge CFTypeRef _Nullable)(@"TimesNewRomanPSMT"); }else{ self.minLabel.font = (__bridge CFTypeRef)_minLabelFont.fontName; } self.minLabel.fontSize = _minLabelFont.pointSize; }

-(void)setMaxLabelFont:(UIFont *)maxLabelFont{ _maxLabelFont = maxLabelFont; if ([_maxLabelFont.fontName isEqualToString:@".SFUI-Regular"]) { self.maxLabel.font = (__bridge CFTypeRef _Nullable)(@"TimesNewRomanPSMT"); }else{ self.maxLabel.font = (__bridge CFTypeRef)_maxLabelFont.fontName; } self.maxLabel.fontSize = _maxLabelFont.pointSize; }

GarthGit avatar Dec 09 '20 10:12 GarthGit

TTRangeSlider.m 文件中 方法 setMinLabelFont 方法 setMaxLabelFont

GarthGit avatar Dec 09 '20 10:12 GarthGit

It's been discussed here: https://github.com/TomThorpe/TTRangeSlider/issues/99

A-Tan5 avatar Jan 12 '21 06:01 A-Tan5