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.
有没有办法让 TextField 的占位符标签从一开始就呈现在顶部?
当我专注于文本字段并且它是空的时,我不希望它被动画化。
是的,如果您使用2.1.0版本,您可以将 TextField 的isPlaceholderAnimated属性设置为false. 这应该会给你想要的效果。
isPlaceholderAnimated
false
例如
let textField = TextField() textField.isPlaceholderAnimated = false
:)