You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func touchEvent(sender: ASButtonNode) {
if let indexPath = tableNode.indexPathForRow(at: sender.view.convert(sender.bounds.origin, to: tableNode.view)) {
......
}
}
console:
2017-05-04 16:12:57.212843+0800 xxxxxxxx[1313:252058] *** Assertion failure in ASDisplayNode *ASDisplayNodeFindClosestCommonAncestor(ASDisplayNode *__strong _Nonnull, ASDisplayNode *__strong _Nonnull)(), /Users/wes709/Desktop/xxxxxxxx/Pods/Texture/Source/ASDisplayNodeExtras.mm:283
2017-05-04 16:12:57.222448+0800 xxxxxxxx[1313:252058] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not find a common ancestor between node1: <ASButtonNode: 0x101457130> and node2: <ASTableNode: 0x10161ea10>'
*** First throw call stack:
(0x190ecafd8 0x18f92c538 0x190ecaeac 0x19196277c 0x1004e7854 0x1004cd104 0x1004cd75c 0x100104180 0x100105194 0x10048e75c 0x10048c91c 0x10048e3a8 0x10048b8c4 0x100434fa0 0x1975c346c 0x1975bf7b8 0x190e789a0 0x190e76628 0x190e76a74 0x190da6d94 0x192810074 0x19705f130 0x1001171a0 0x18fdb559c)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Instead use sender.view.convert(sender.bounds.origin, to: tableNode.view) to get the indexPath in the table node's coordinate system, that can get the right consequence.
The text was updated successfully, but these errors were encountered:
code like this:
console:
Instead use
sender.view.convert(sender.bounds.origin, to: tableNode.view)
to get the indexPath in the table node's coordinate system, that can get the right consequence.The text was updated successfully, but these errors were encountered: