目前知道怎么自由拖动imageview了,可是不知道怎么才能让它只能在制定范围内拖动呢?求教
漂亮男人2017-05-02 09:23:31
This question is also a drunk one. Looking at the username, is the questioner a girl? A little thought on this issue will yield results.
A simple answer:
You need to set a range, and then determine whether it touches the edge based on the position of the imageView. If so, then you are not allowed to continue dragging in that direction.