是否可以将UIActivityIndicatorView添加到UITableViewCell的左侧?我们已经使用UITableViewCell的右侧作为披露指标。iPhone SDK简单问题
谢谢。
是否可以将UIActivityIndicatorView添加到UITableViewCell的左侧?我们已经使用UITableViewCell的右侧作为披露指标。iPhone SDK简单问题
谢谢。
当然。只需实例化一个UIActivityIndicatorView,给它一个.frame,它将它设置在你想要的位置,将它作为cell.contentView的子视图添加,然后调用startAnimating
。
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc]
initWithFrame:CGRectMake(0,0,20,20)]; //or whatever--this will put it in the top left corner of the cell
[cell.contentView addSubview:spinner]
[spinner startAnimating];
[spinner release];
如果您创建自定义单元格,则可以执行任何您想要的操作。但this document here from Apple应该给你所有你需要的只是添加子视图到一个普通的旧UITableViewCell或创建自己的。
工作完美。谢谢。 – LandonSchropp 2010-08-20 03:40:38