我有這樣的代碼來拖動ImageView的:IOS:拖動ImageView的不是從中心
在touchbegan:
CGPoint point = [touch locationInView:self];
[imageView setCenter:point];
在touchmoved
:
CGPoint point = [touch locationInView:self];
[imageView setCenter:point];
這個代碼允許有ImageView的過在我的手指下移動並形成其中心。 但我想要的東西,不僅可以從imageview的中心,而且也可以從imageview的另一個點拖動imageview,並且不拖動它,如果我觸摸出這個imageView ...你能幫助我嗎?
http://stackoverflow.com/questions/4982277/uiview-drag-image-and-text/8332581#8332581 –