为什么UIPickerView是半透明的 [英] Why UIPickerView is semi transparent
本文介绍了为什么UIPickerView是半透明的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么UIPickerView
不是%100不透明的?
当我将文本颜色设置为白色并将UIPickerView放在红色背景上时,UIPickerView项的文本颜色为红白色.
Why UIPickerView
is not %100 opaque?
When I set text color to white and put UIPickerView on a red background, the UIPickerView items have a reddish white text color.
我尝试使用viewForRow
进行自定义视图,但是仍然没有效果.
I tried custom views using viewForRow
, but still no effect.
如何将UIPickerView的不透明度设置为%100? 在IB中,alpha为1,但实际上在运行时并非如此
How can I set opacity of UIPickerView to %100? In IB it's alpha is 1 but actually in runtime it isn't
推荐答案
请尝试使用此委托并创建自己的自定义视图并返回.
Please try this delegate and make your own customize view and return it.
-(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:
这篇关于为什么UIPickerView是半透明的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文