隐藏Swiftui Textfield光标
我正在尝试将光标隐藏在Textfield中,并通过.AccentColor(.clear)
成功地进行了此操作,但是在文档中,指定AccentColor
将被弃用和弃用和我应该使用.tint(.clear)
,但这不做AccentColor
做的工作。有帮助吗?我还必须设置其他一些参数还是解决方案是什么?我真的不想留下会在我的代码中弃用的东西
I am trying to hide the cursor in TextField and managed to successfully do it using .accentColor(.clear)
, however in the documentation it is specified that accentColor
will be deprecated and I should use .tint(.clear)
, but this doesn't do the job which accentColor
did. Any help? Do I have to set some other params as well or what is the solution? I really don't want to leave something that is gonna be deprecated in my code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论