I have the following code set:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"customCell";
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nibObjs = [[NSBundle mainBundle] loadNibNamed:@"CustomCellView" owner:nil options:nil];
//cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
for(id currentObj in nibObjs)
{
if([currentObj isKindOfClass:[CustomCell class]])
{
cell = (CustomCell *)currentObj;
}
}
}
AssessmentDetail * anAssess = [module.assessmentDetails4 objectAtIndex:indexPath.row];
[[cell labelAssessment] setText:anAssess.assessmentName4];
return cell;
}
In my custom cell there is a UISlider. What I would like to do is use a button to retrieve the value of each UISlider from each row so I can get a total value.
I thought about doing this but I’m not certain on where to go from there:
- (IBAction) calculateTotal:(id)sender {
static NSString *CellIdentifier = @"customCell";
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
}
Thanks for the help.
Cycle through the subviews of the UITableView: