How to draw square to tag an object. (React Native)

后端 未结 2 1853
广开言路
广开言路 2021-01-01 03:34

I see many mobile apps having a feature that user can draw a square to indicate something to tag on the image.

I\'m building Face Tagging app and basical

2条回答
  •  时光取名叫无心
    2021-01-01 04:04

    You can add children (in your case, square Views) to an Image tag, so you could do something like

    
      
    
    

    You can get the x and y coordinates with the PanResponder API instead of hardcoding the top and left style properties

    Edit: RN 50=< Removed support of nested content inside , use ImageBackground instead

提交回复
热议问题