Home > Mobile >  ReactNative - Find views absolute position after it is scrolled/moved?
ReactNative - Find views absolute position after it is scrolled/moved?

Time:10-07

I am trying to find the absolute position of a view. I can easily get its position using onLayout (#1 #2)

But this only gives the initial rendering position, but if the view is moved around due to scrolling, onLayout function is not firing again.

Can anyone please tell me if there is a way to get the absolute position after a change in view's position? It will be awesome if there is a function or something that I can call with the view and, it will give its position. Thanks

CodePudding user response:

RCTUIManager does this same thing. Check out this example.

  • Related