自定义UITextField [英] Custom UITextField

查看:100
本文介绍了自定义UITextField的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何创建 UITextField ,就像这张图片中的那个?

How would I go about creating a UITextField like the one in this image?

它看起来略大一些,特别是高度。

It appears to be slightly larger, specifically in height.

推荐答案

你可能想要使用背景 borderStyle UITextField 的属性。将 borderStyle 设置为 UITextBorderStyleNone 并创建一个自定义背景图像以进行拉伸并用作背景属性是一种方法。

You probably want to use the background and borderStyle properties of UITextField. Setting borderStyle as UITextBorderStyleNone and create a custom background image to be stretched and used as the background property would be one approach.

我建议看看 UITextField类引用

这篇关于自定义UITextField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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