21、通过字体大小 确定Label 的 size
2016-05-12 本文已影响58人
天听云道
//----
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14],NSFontAttributeName, nil];
CGSize size = [label.text sizeWithAttributes:dic];
//----
//----
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:14],NSFontAttributeName, nil];
CGSize size = [label.text sizeWithAttributes:dic];
//----