• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving a UIView when has a CAAffineTransformationRotate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving a UIView when has a CAAffineTransformationRotate


  • Subject: Re: Moving a UIView when has a CAAffineTransformationRotate
  • From: Gustavo Pizano <email@hidden>
  • Date: Tue, 30 Nov 2010 19:30:54 +0100

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 (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

  • Follow-Ups:
    • Re: Moving a UIView when has a CAAffineTransformationRotate
      • From: David Duncan <email@hidden>
References: 
 >Moving a UIView when has a CAAffineTransformationRotate (From: Gustavo Pizano <email@hidden>)
 >Re: Moving a UIView when has a CAAffineTransformationRotate (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Moving a UIView when has a CAAffineTransformationRotate
  • Next by Date: Re: Moving a UIView when has a CAAffineTransformationRotate
  • Previous by thread: Re: Moving a UIView when has a CAAffineTransformationRotate
  • Next by thread: Re: Moving a UIView when has a CAAffineTransformationRotate
  • Index(es):
    • Date
    • Thread