【发布时间】:2013-01-18 07:22:06
【问题描述】:
当我从一个 UIView 移动到另一个 UiView 时,我需要在 didSelectRowatIndexPath 事件中显示 activityindicator。只要加载另一个 uiview 的过程需要,它就应该显示。
我该怎么做?
【问题讨论】:
标签: iphone xcode uiactivityindicatorview
当我从一个 UIView 移动到另一个 UiView 时,我需要在 didSelectRowatIndexPath 事件中显示 activityindicator。只要加载另一个 uiview 的过程需要,它就应该显示。
我该怎么做?
【问题讨论】:
标签: iphone xcode uiactivityindicatorview
试试下面的代码,但我给出的例子你应该根据你的需要修改和使用:
alert= [[UIAlertView alloc] initWithTitle:@"Loading\nPlease Wait..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
[alert show];
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
indicator.center = CGPointMake(150, 100);
[indicator startAnimating];
[alert addSubview:indicator];
好的,在推送你的班级后使用这条线来关闭指示器:
[alert dismissWithClickedButtonIndex:0 animated:YES];
试试看。祝你好运。
【讨论】: