为什么alpha不变?我想backgroundView是可见的,而负载网络负载

问题描述:

  1. 列表项
UIView *backgroundViewLoad = [[UIView alloc] initWithFrame:self.view.frame]; 
[self.view addSubview:backgroundLoad]; 

UIActivityIndicate *activity = [[UIActivityIndicate alloc] init]; 
activity.center = backgroundViewLoad.center; 
[backgroundViewLoad addSubview:activity]; 

[backgroundViewLoad setAlpha:1]; 

//load Network Data 

[UIView setAlpha:0]; 

你还没有添加子视图backgroundViewLoad,只是改变这一点:

[self.view addSubview:backgroundLoad]; 

这样:

[self.view addSubview: backgroundViewLoad];