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.
我正在从服务器下载字符串数据。数据包含换行符"\n",当我将字符串分配给Label的 text 属性时,新行字符打印为"\n"而不是在行之间换行。如果我在本地存储了相同的字符串,它工作正常!我正在获取 UTF8 字符串。那是问题吗?
"\n"
Label
将此行添加到您的 UILabel 创建
label.numberOfLines = 0;
希望这可以帮助你..