【发布时间】:2014-05-16 02:10:55
【问题描述】:
我正在实现某种加载屏幕,其中包含一个黑色 uiview,其中心有一个微调器。
当tableview被向下滚动加载时,加载屏幕在顶部,如果tableview已经滚动到底部,加载屏幕消失。
功能:
UIView *blackScreen = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
blackScreen.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
blackScreen.tag = LOADING_SCREEN_TAG;
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
spinner.center = CGPointMake(CGRectGetWidth(self.view.bounds)/2,
CGRectGetHeight(self.view.bounds)/2.3);
spinner.tag = SPINNER_TAG;
[spinner startAnimating];
[self.view addSubview:blackScreen];
[self.view addSubview:spinner];
[self.view setUserInteractionEnabled:NO];
【问题讨论】:
标签: objective-c uitableview uiview