开发者

IPHONE: For UITableView -- changing to next view takes time, how to show UIActivityIndicatorView?

开发者 https://www.devze.com 2022-12-23 08:07 出处:网络
So, my UITableViewCell has UITableViewCellAccessoryDetailDisclosureButton, and when somebody clicks on it it make long time just to show next view screen... so I want to show some \"rolling wait image

So, my UITableViewCell has UITableViewCellAccessoryDetailDisclosureButton, and when somebody clicks on it it make long time just to show next view screen... so I want to show some "rolling wait image" (UIActivityIndicatorView ?) say next to UITableViewCellAccessoryDetailDisclosureButton in this cell开发者_开发百科, but how do I do it right? How to use UITableViewCellAccessoryDetailDisclosureButton properly?

Thank you.


You can use a UIActivityIndicator as a UITableViewCellAccessory like so:

UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[activityView startAnimating];
cell.accessoryView = activityView;
[activityView release];
0

精彩评论

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