I have designed a prototype cell in a Storyboard's view controller, but unfortunately the UISlider
in the cell is not sliding.
Note:- Autolayout is enabled for this storyboard.
Design:-
Here is code:- to render the cell in UITableview
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell;
if(indexPath.row!=self.arrSelectRecipientsImages.count-1 )
{
cell = [tableView dequeueReusableCellWithIdentifier:@"selectReciptenceTabCell" forIndexPath:indexPath];
}
else
{
cell = [tableView dequeueReusableCellWithIdentifier:@"selectNearbyTabCell" forIndexPath:indexPath];
UISlider *sliderNearby = (UISlider *)[cell.contentView viewWithTag:199];
lblDistance = (UILabel *)[cell.contentView viewWithTag:190];
sliderNearby.userInteractionEnabled = YES;
[sliderNearby setThumbImage:[UIImage imageNamed:@"NearbyCircle"] forState:UIControlStateNormal];
[sliderNearby addTarget:self action:@selector(sliderNearbyAction:) forControlEvents:UIControlEventValueChanged];
}
return cell;
}
didSelectRow
touch delegate is conflicting with slider touch. – Mention