隐藏Swiftui Textfield光标

发布于 2025-02-03 18:20:39 字数 233 浏览 0 评论 0原文

我正在尝试将光标隐藏在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文