如何调整搜索栏大小以使索引不重叠

发布于 2024-09-07 12:34:02 字数 486 浏览 3 评论 0原文

我一直在浏览堆栈溢出,但找不到对此的简单新手级解释。我有以下行为。当用户单击搜索时,索引将被删除,并且搜索栏旁边会出现取消按钮。当按下取消按钮时,取消按钮将被移除并且索引将重新出现。

有谁知道一种简单的方法可以将右侧搜索栏(文本字段)的宽度减少 20-30 像素。这就是联系人应用程序处理此叠加层的方式。

任何帮助不胜感激。我已经在 xib 文件中构建了视图。

alt text

I've been browsing stack overflow and can't find a simple newbie-level explanation for this. I have the following behaviour. When the user clicks the search the index is removed and a cancel button appears next to the search bar. When cancel is pressed, the cancel button is removed and the index reappears.

Does anyone know a simple way to reduce the width of the search bar (text field) by 20-30 pixels on the right. This is the way the contacts app deals with this overlay.

Any help gratefully appreciated. I've built the view in a xib file.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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