UIFont *font = [UIFont systemFontOfSize:32];
CGFloat pointSize = font.pointSize;
CGFloat capHeight = font.capHeight;
CGFloat xHeight = font.xHeight;
CGFloat lineHeight = font.lineHeight;
CGFloat leading = font.leading;
CGFloat ascender = font.ascender;
NSLog(@"pointSize = %@", @(pointSize)); <span style="white-space:pre"> </span>//32
NSLog(@"ascender = %@", @(ascender)); //30.464
NSLog(@"capHeight = %@", @(capHeight)); //22.848
NSLog(@"xHeight = %@", @(xHeight)); //16.544
NSLog(@"lineHeight = %@", @(lineHeight));<span style="white-space:pre"> </span>//38.176
NSLog(@"leading = %@", @(leading)); //38.176
iOS UIFont 初识
最新推荐文章于 2024-03-25 13:49:56 发布