• 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
How to move UIImageView in order to always keep image's head forward?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: NSButton in NSToolbarItem does not use "small size"
  • Next by Date: Re: archiving report
  • Previous by thread: Re: NSScrollView and autolayout
  • Next by thread: customizing cursor nssearchfield
  • Index(es):
    • Date
    • Thread