I asked one doubt yesterday, here at this link
In that I got 4 answers. Those 4 answers helped me to solve my problem. But now in same scenario, I have another issue. When I open 3rd cell it opens in same place.
I want to close that cell, so I press the button then it closes successfully. but the issue is after closed, it goes to top position.
How to solve this issue. I think I did mistake in calling this method scrollToRowAtIndexPath
. In my previous question, (Refer the 1st line link) I changed a single line in below described method.
- (void)method_Expand:(UIButton*)sender
{
int_SelectedIndex = sender.tag;
[tbl_CalendarList scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:int_SelectedIndex inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
NSLog(@"Selected Button : %ld",(long)int_SelectedIndex);
if ( int_TempSelectedIndex != int_SelectedIndex)
{
int_TempSelectedIndex = int_SelectedIndex;
}
else
{
int_TempSelectedIndex = -1;
}
[tbl_CalendarList reloadData];
}