dragging to move objects around?
dragging to move objects around?
- Subject: dragging to move objects around?
- From: Darren Minifie <email@hidden>
- Date: Wed, 22 Jul 2009 04:27:11 -0700
Hi
I am trying to implement the ability to move subviews around a view by
dragging them. The simple code I have thus far:
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint
operation:(NSDragOperation)operation{
[self setFrameOrigin:[self convertPointFromBase:aPoint]];
}
Here the image that is moving about is an exact copy of the original
subview. When the endedAt method executes, I would like the subview's frame
to be changed to where the last position of the dragged image was. The code
I have thus far is producing some undpredictable results. for example, i'll
drag the subview straight down ( no change in x) but the subview will be
moved somehwere far to the left or right.
--
Darren Minifie
Computer Science Masters Candidate
University of Victoria, BC. Canada
My Rants: www.noisyair.com
My Band: www.ohsnapmusic.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden