我有一个很长的字符串,如下所示......
[[sqrt(221)-10,-sqrt(221)-10],[11,11]],[[rootof([[474368400,237184200,-125944810200,258530778000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)+rootof([[409681800,9099248400,-99876110400,-1875803589000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*3,rootof([[-3439170900,-50638826700,864180632700,9670592794500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)+rootof([[1477010700,22974524100,-369910322100,-4442729593500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*3],[rootof([[474368400,237184200,-125944810200,258530778000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*2+rootof([[409681800,9099248400,-99876110400,-1875803589000],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*4,rootof([[-3439170900,-50638826700,864180632700,9670592794500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*2+rootof([[1477010700,22974524100,-369910322100,-4442729593500],[1,0,-472,884,42215]])/(sqrt(221)*782707860000)*4]],[sqrt(sqrt(221)+15),sqrt(-sqrt(221)+15)]
如何在 UILabel 中显示超过一行 (0) 的全部内容?
此外,虽然字符串中没有换行符(“\n”),但结果显示如下......
[[sqrt(221)-10,-sqrt(221)-
10],[11,11]],[[rootof([[474368400,2
37184200,-
125944810200,258530778000],[1,
0,-
472,884,42215]])/(sqrt(221)*78270
有什么帮助吗?
PS 我可以上传图片,但我不被允许,因为我是新用户......
最佳答案
textLabel.lineBreakMode = UILineBreakModeWordWrap;
textLabel.numberOfLines = 0;
关于iPhone/Objective - C - 如何在 UILabel 中显示长字符串的整个文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11225460/