【发布时间】:2012-12-21 14:03:08
【问题描述】:
我有一个 UIView,其中一些部分是半透明的(alpha
-(void)viewDidLoad{
//......
self.viewSito = [[UIView alloc]init];
//this view has some parts semi-trasparent and other opaque
self.buttonClose =[UIButton buttonWithType:UIButtonTypeRoundedRect];
self.buttonClose.backgroundColor=[UIColor blackColor];
self.buttonClose.alpha =1.0;
/*the output is semi-transparent when is on uiview semi-transparent, but when uiview is
opaque the button is not visible, as if it were "hidden" from the opaque part
of the view.*/
//...
[self.viewSito addSubview:self.buttonClose];
}
按钮还能用,只是能见度的问题。怎么办?
【问题讨论】:
标签: uiview uibutton subview alpha