1.黑白透明 alpha:透明度比例 只能设置白色或者黑色的alpha
view.backgroundColor = [UIColorcolorWithWhite:0.falpha:alpha];
2.背景可设置任何颜色的透明度,而子控件不变
view.backgroundColor = [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
或
UIColor *color= color; (任意颜色)
view.backgroundColor= [color colorWithAlphaComponent:alpha];