我怎样才能让那个标签在每个字符串之间沿着一条线

how can I make that label go down a line between every string

我有这个字符串数组 我希望它在标签内,以便每个字符串都有 line

"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."
]

我希望它在标签内,这样每个字符串都有行

您可以尝试这样的操作:

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." ]

SwiftUI

Text(arrayStr.joined(separator: "\n\n"))

故事板

label.text = arrayStr.joined(separator: "\n\n")