Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何让标签显示多行字符串?
例如,给定的字符串是@"HelloA\nHelloB\nHelloC\n"。
如何显示它:
@“你好”
@“你好乙”
@“你好ç”
我找到了一些自定义 UILabel 的属性:
label.numberOfLines = 3; label.adjustsFontSizetoFitWidth = YES; label.minimumFontSize = 8.0f;
'\n' 可以用作尾部截断标记。