有没有办法必须从一开始就在顶部呈现占位符标签

Is there a way to have to placeholder label rendered at the top from the beginning

有没有办法让TextField的placeholder label从一开始就渲染在顶部?

我不希望它在我专注于文本字段但它是空的时显示动画。

是的,如果您使用版本 2.1.0,您可以将 TextField 的 isPlaceholderAnimated 属性 设置为 false。那应该会给你想要的效果。

例如

let textField = TextField()
textField.isPlaceholderAnimated = false

:)