背景图像 TextField 不出现

发布于 2025-01-03 10:07:21 字数 118 浏览 3 评论 0原文

我在界面生成器中有 XCode 4.2,

我正在为 TextField 选择背景图像,但它没有出现。我对自定义按钮做了同样的事情,效果很好。不知道我错过了什么。

愚蠢的问题,但我无法弄清楚。

I have XCode 4.2

In interface builder i´m choosing a background image for my TextField but it just doesn´t appear. I did the same for a custom button and worked great. Don´t know what i´missing.

Dumb question, but i can´t figured it out.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

前事休说 2025-01-10 10:07:21

可能是以下之一...
如果禁用文本字段或将 borderStyle 值设置为 UITextBorderStyleRoundedRect 样式,则与文本字段关联的自定义背景图像将被忽略。

Possibly one of the following...
If the textfield is disabled or if the borderStyle value is set to the UITextBorderStyleRoundedRect style, the custom background image associated with the text field is ignored.

剩余の解释 2025-01-10 10:07:21

与文本字段关联的自定义背景图像将可见。

 self.textfieldName.borderStyle =UITextBorderStyleNone;

The custom background image associated with the text field would be visible.

 self.textfieldName.borderStyle =UITextBorderStyleNone;
财迷小姐 2025-01-10 10:07:21
textfield.borderStyle =UITextBorderStyleNone;

textfield.background=[UIImage imageNamed:@"txt2.jpg"];
textfield.borderStyle =UITextBorderStyleNone;

textfield.background=[UIImage imageNamed:@"txt2.jpg"];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文