我正在嘗試水平排列文本,例如描述,但我以丑陋的東西結尾。我將在下面發布代碼,也許有人知道如何解決這個問題。謝謝 !
VStack {
HStack {
ForEach(meniu!.ingredients) { men in
let ingredient = syncViewModel.fetchByIdIngredients(ingredientId: men.ingredient)
if ingredient != nil {
Text("\(ingredient?.name ?? "" ), ")
.foregroundColor(.colorGrayDark)
} else {
EmptyView()
}
}
}
}
uj5u.com熱心網友回復:

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/429693.html
上一篇:如何在Swift中將ClosedRange<Int>轉換為ClosedRange<Double>
下一篇:如何從網址中洗掉特殊字符?
