How to move UIImageView in order to always keep image's head forward?
How to move UIImageView in order to always keep image's head forward?
- Subject: How to move UIImageView in order to always keep image's head forward?
- From: Jingwei Xu <email@hidden>
- Date: Wed, 27 Feb 2013 12:16:20 +0800
I have posted this question in StackOverflow, I am hurry to the solution,
so I post question here again.
Assume I have an UIImageView in ViewController's view, and this UIImageView
contains an image. For example, that is a car image, and car's head directs
to the north in default.
Then, I want to do some rotation and movement for that char(actually for
UIImageView).
I use CGAffineTransformRotate function to rotate it
CGAffineTransform newTransform =
CGAffineTransformRotate(_ImageView.transform, angle);
Then assign values to tx and ty of newTransform respectively.
That's it. But values to tx and ty is in UIImageView's coordinate system
and that system won't be rotated even UIImageView rotated.
My question is: Is there any easy way to get the value of tx and ty so that
we could keep UIImageView move straightforward? Even the direction of
image's head has been changed.
--
Jingwei Xu
ICS Group
State Key Laboratory for Novel Software Technology
Department of Computer Science and Technology
Nanjing University
Addr: 163 Xianlin Road, Nanjing 210046, P. R. China
_______________________________________________
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