如何正确设置UIView的alpha? [iOS]
问题描述:
我有UIView
有很多子视图(UILabel,UITextView等)。如何正确设置UIView的alpha? [iOS]
如果设置alpha 0.6到主视图,所有的子视图都需要这个alpha。
如何分别设置主视图的alpha?
答
[view setBackgroundColor:[[UIColor clearColor] colorWithAlphaComponent:0.5]];
//try this.. dont try to set alpha of UIView and also your subviews will not affect
我觉得有用))谢谢!!! – Romowski