Sorry keeping mail in the list,

On Nov 30, 2010, at 7:29 PM, Gustavo Pizano wrote:

> Hello David, thanks for the reply.
> 
> I have replace the code for this:
> 
>                       UITouch *aTouch = [touches anyObject];          
>                       CGPoint loc = [aTouch locationInView:self];             
>         
>                       CGPoint prevloc = [aTouch previousLocationInView:self]; 
>                 
>                       CGPoint center = self.center;                   
>                       float deltaX = loc.x - prevloc.x;                       
>                       float deltaY = loc.y - prevloc.y;                       
>                       center.x += deltaX;                     
>                       center.y += deltaY;                     
>                       [self setCenter:center];
> 
> it works ok for anything but views with a transformation, rotate in this 
> case) applied, im still having the same behavior as before, what am I doing 
> wrong?.
> 
> Thanks
> 
> Gustavo
> 
> On Nov 30, 2010, at 7:11 PM, David Duncan wrote:
> 
>> On Nov 30, 2010, at 9:49 AM, Gustavo Pizano wrote:
>> 
>>> Any help or tip may be appreciate, my linear algebra is not that good ... 
>>> :SS I wanna cry... 
>> 
>> 
>> Move the center instead of the frame. The frame is derived from the center, 
>> bounds.size and transform, so once you've placed a transform on the view the 
>> frame is a much less reliable means of making adjustments to the view.
>> --
>> David Duncan
>> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to