基本上,我有一个包含uiprogressview和uiswitch的每个单元的uitableview。切换开关切换progressview的可见性。在uitableview的每一行中切换uiprogressview的可见性一次切换多个
但是。
如果我切换行中的开关:0。行中的progressview:0和row:11显示。
我的开关有这个: [(UISwitch *)cell.accessoryView addTarget:self action:@selector(PrefetchStudy :) forControlEvents:UIControlEventValueChanged];
,这里是动作:
-(void)PrefetchStudy:(id)sender
{
UISwitch *tmpSwitch = (UISwitch*)sender;
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:tmpSwitch.tag inSection:0];
CustomCell *cell = (CustomCell *)[self.tableview cellForRowAtIndexPath:indexPath];
NSString *tmp = cell.patient_name.text;
NSLog(@"This is the patient name of the selected row: %@", tmp);
if(tmpSwitch.on)
{
cell.progressBar.hidden = NO;
}
else
{
cell.progressBar.hidden = YES;
}
}
任何建议,为什么发生这种情况?
,如果我的NSLog()从该小区的其他价值,我改变了progressView的知名度..它只输出1行数据......并输出正确的行数据...... – Critter 2011-03-24 12:47:54
这很奇怪。如果我是你,每次进度条的隐藏属性发生变化时,我都会断断续续,并查看程序何时到达这些以及它是如何发生的。 – 2011-03-26 00:17:50