I think you should bringToFront the cell in Table I have tried this and it is working for me... I hope this will help you:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
if (!cell)
{
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:@"Cell"];
}
if (indexPath.row == selected)
{
cell.layer.backgroundColor = [[UIColor whiteColor] CGColor];
cell.layer.shadowColor = [UIColor blackColor].CGColor;
cell.layer.shadowOffset = CGSizeMake(0, 0);
cell.layer.shadowRadius = 10.0;
cell.layer.shadowOpacity = 0.7;
[cell.superview bringSubviewToFront:cell];
}
else
{
cell.layer.shadowOpacity = 0;
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
selected = indexPath.row;
[tableView reloadData];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:(UITableViewRowAnimationNone)];
}