简体   繁体   English

如何在Tableviewcell中更新UIProgressview?

[英]How to update UIProgressview in Tableviewcell?

在将UIProgressview添加到cell.contentview中之后,如何访问该单元上的Update Progressview?

按住指针或设置标签,然后稍后通过标签找到UIProgressView对象。

@Nick This sounds not to be good idea. @Nick听起来不是个好主意。 Since some UITableViewCells may be reused by the UITableView for better performance, some rows may share a same UITableViewCell, in which case share a same UIProgressView. 由于某些UITableViewCells可以被UITableView重用以获得更好的性能,因此某些行可能共享同一UITableViewCell,在这种情况下,共享同一UIProgressView。 If you update the progress for some one row, it will also affect some other rows which share this table view cell. 如果您更新某一行的进度,则也会影响共享该表视图单元格的其他一些行。

No matter what, that's what I'm meeting now. 不管怎样,那就是我现在要开会的地方。 What I'm gonna do is mark some flag in UITableViewCell to indicate by which row it is being used in the method: 我要做的是在UITableViewCell中标记一些标志,以指示该方法在哪一行中使用:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM