打印所有系统字体名字,创建可拉伸图片,获取文字长度

打印所有系统字体名字

创建可拉伸图片

talkBubbleImageView.image = [[UIImage imageNamed:@"Grey@2x"] stretchableImageWithLeftCapWidth:20 topCapHeight:26]; 

获取文字长度 

NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:14],};

       CGSize Size = [btn.titleLabel.text boundingRectWithSize:CGSizeMake(220, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;

群号:186052819
原文地址:https://www.cnblogs.com/zuidap/p/5763965.html