我有這個字串陣列我希望它在標簽內,以便每個字串都有行
"method": [
"Bring a large frying pan of salted water to the boil over medium-high heat. Add the asparagus and cook for 2-3 minutes or until bright green and tender crisp. Use tongs to transfer the asparagus to a plate. Cover to keep warm.",
"Add the vinegar to the water in pan. Reduce heat to medium-low. Crack 1 egg into a small bowl. Use a spoon to stir the water to make a whirlpool. Carefully pour the egg into the centre of the whirlpool. Cook for 4 minutes for a soft yolk or until cooked to your liking. Use a slotted spoon to transfer to a plate. Cover with foil to keep warm. Repeat with remaining eggs.",
"Divide the asparagus among serving plates. Top with an egg. Season with salt and pepper. Top with parmesan to serve."
]
我希望它在標簽內,以便每個字串都有行
uj5u.com熱心網友回復:
你可以嘗試這樣的事情:
let arrayStr = [ "Bring a large frying pan of salted water to the boil over medium-high heat. Add the asparagus and cook for 2-3 minutes or until bright green and tender crisp. Use tongs to transfer the asparagus to a plate. Cover to keep warm.", "Add the vinegar to the water in pan. Reduce heat to medium-low. Crack 1 egg into a small bowl. Use a spoon to stir the water to make a whirlpool. Carefully pour the egg into the centre of the whirlpool. Cook for 4 minutes for a soft yolk or until cooked to your liking. Use a slotted spoon to transfer to a plate. Cover with foil to keep warm. Repeat with remaining eggs.", "Divide the asparagus among serving plates. Top with an egg. Season with salt and pepper. Top with parmesan to serve." ]
用戶界面
Text(arrayStr.joined(separator: "\n\n"))
故事板
label.text = arrayStr.joined(separator: "\n\n")
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/399861.html
上一篇:我是nodejs的新手,我在使用郵遞員發帖時遇到了一些問題
下一篇:操作無法完成。應用程式資訊提供程式(FBSApplicationLibrary)為“io.dopple.Dopple”回傳nil
