Augustyniak / RATreeView

Library providing easy-to-use interface for displaying tree structures on iOS and tvOS.
MIT License
2.49k stars 466 forks source link

selectRowForItem does not work #194

Open zhenghaocn opened 7 years ago

zhenghaocn commented 7 years ago

Hi, I have a problem on selectRowForItem, this API is not work for me. The code as follows, the cell is not selected after I call selectRowForItem.

RADataObject *item = [self.treeView itemForCell:cell]; [self.treeView selectRowForItem:item animated:YES scrollPosition:RATreeViewScrollPositionNone];

Any help is welcome, thanks a lot.

JCalabretta-MaxetaTech commented 7 years ago

I am having a similar problem. didSelectRowForItem doesn't seem to be getting called when clicking a cell. This was working in swift 2 but since upgrading to swift 3 it no longer works.

JCalabretta-MaxetaTech commented 7 years ago

Make sure your target in your podfile is correct and that your version of the ratreeview is the latest.

telipskiy commented 7 years ago

I have the same problem

telipskiy commented 7 years ago

Sorry for wrong comment. There is no bug. All works as must.

From Apple docs:

Calling this (-selectRowAtIndexPath:animated:scrollPosition:) method does not cause the delegate to receive a tableView:willSelectRowAtIndexPath: or tableView:didSelectRowAtIndexPath: message, nor will it send UITableViewSelectionDidChangeNotification notifications to observers.