Closed sanemat closed 12 years ago
Selecting cells in table views are handled automatically for you by UITableView (andEasyTableView). The code you commented out is simply to prevent a user from selecting a selected cell more than once. However, I tried commenting out the same code and everything works fine. That is because setSelectedIndexPath: includes another check against _selectedIndexPath. This check is required for the logic within setSelectedIndexPath to be valid. Have you tried simply using EasyTableView's delegate method easyTableView:selectedView:atIndex:deselectedView:?
I use EasyTableView's delegate method "easyTableView:selectedView:atIndex:deselectedView:". I did not catch "index" in * selected * cell. I want to detect touch event on selected cell "more than once".
Go to EasyTableView.m and...
In - (void)setSelectedIndexPath:(NSIndexPath *)indexPath
, remove the following condition:
if ([_selectedIndexPath isEqual:indexPath])
and keep the block
In - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
remove the condition if ([_selectedIndexPath isEqual:indexPath])
and the block (return nil;
)
Hope this helps!
Hi, I want to control touch event on selected cell. I try to custom EasyTableView, but I failed. Please give me any advice.
my try: l208-l211 comment out : failed