Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

How to get ASCellNode location on ASCollectionNode #3357

Open
abhigourking opened this issue Jan 15, 2021 · 0 comments
Open

How to get ASCellNode location on ASCollectionNode #3357

abhigourking opened this issue Jan 15, 2021 · 0 comments

Comments

@abhigourking
Copy link

abhigourking commented Jan 15, 2021

Need to find the X, Y position of ASCellNode on the ASCollectionNode.
cellnode.frame always returning 0 for X and Y position.

The frameInWindow property does but it is only for the debugging purpose and can not be accessible in code.
// This should only be called for debugging. It's not thread safe and it doesn't assert.
// NOTE: Returns CGRectNull if the node isn't in a hierarchy.
- (CGRect)_frameInWindow

collectionNode.convert(cellNode.bounds, from: cellNode) Crashing the app Could not find a common ancestor between node1: cellNode and node2: <ASCollectionNode

collectionNode.convert(cellNode.bounds, from: nil) Returning some negative value

Anybody please help me out to find a solution.
My requirement is to get the ASCellNode's Frame in respect to ASCellectionNode
ie The Y position of frame should increase or decrease while scrolling the colllection node in (vertical layout).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant