开发者

problem in adding uiactivity indicator in uitableview controller

开发者 https://www.devze.com 2023-01-17 07:09 出处:网络
Hi i am not able to add uiactivity indicator in uitableview controller, can someone help me out I am having a table view controller now on click event ofcell in table i want to display activity indi

Hi i am not able to add uiactivity indicator in uitableview controller, can someone help me out

I am having a table view controller now on click event of cell in table i want to display activity indicator because on click event of cell it takes 3 to 4 second of processing , so i want to display activity indicator at that time 开发者_如何学编程but when i drag and drop activity indicator on tableview controller it does allow me to add that so i am confused how to add that activity indicator

thansk in advance..


You can use this code:

UIActivityIndicatorView* activityIndicator = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleWhiteLarge] autorelease];

activityIndicator.center = yourTableView.center;

[activityIndicator startAnimating];

[yourTableView addSubview: activityIndicator];

top stop it simply use

[activityIndicator removeFromSuperview];
activityIndicator = nil;


Why dont you add it programatically in your cell's accesory view?


Do you have it wired up properly to the controller class in IB? Where are you trying to display it? How are you doing it in the code? These are things that would be helpful to know...

0

精彩评论

暂无评论...
验证码 换一张
取 消