如何更改UITextField,使其看起来像搜索文本字段? [英] How do I change the UITextField so it looks like the Search Text Field?

查看:95
本文介绍了如何更改UITextField,使其看起来像搜索文本字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改标准的iPhone UITextField,使其看起来与UISearchBar中的搜索文本字段完全相同。您可以在iPhone消息应用程序中的短信文本输入字段查看此示例。

I would like to change the standard iPhone UITextField so that it looks exactly like the search text field within the UISearchBar. You can see an example of this for the SMS text entry field within the iPhone Messages application.

我不相信UITextField有一个符合此要求的样式属性。任何想法?

I do not believe that the UITextField has a style property that will meet this requirement. Any ideas?

推荐答案

这似乎并不支持iPhone OS 3.0。我只是使用一个透明的UITextField与UIImageView作为背景。我相信这是官方iPhone短信文本输入的工作原理。

It seems that this is not supported within iPhone OS 3.0. I just used a transparent UITextField with UIImageView as the background. I believe this is how the official iPhone SMS text entry works.

这篇关于如何更改UITextField,使其看起来像搜索文本字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆