如何创建透明的UITextField? [英] How do I create a transparent UITextField?

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

问题描述

在我的1) UIView 一(2) UIImageView 将在此(3) UITextView

On my 1) UIView one (2) UIImageView will be on this (3) UITextView.

UITextView 必须是透明的,我们必须查看 imageView

This UITextView must be Transparent and we have to view the imageView.

我该怎么做?

推荐答案

如果你只想让背景(而不是整个UITextView)透明,我相信你应该通过它继承自UIView的backgroundColor属性来做到这一点。

If you only want to make the background (rather than the whole UITextView) transparent, I believe you should be do this via the backgroundColor property it inherits from UIView.

同样......

[yourTextView setBackgroundColor:[UIColor clearColor]];

......应该有希望做到这一点。

...should hopefully do the trick.

但是,如果你想让整个 UITextView透明,那么alpha属性@taskinoor提到是完美的。

If however, you want to make the whole UITextView transparent, the alpha property @taskinoor mentions is perfect.

这篇关于如何创建透明的UITextField?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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