how to rotate CALayer at one selected point.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
bounds
,position
in superlayer andanchorPoint
.anchorPoint
has relative coordinates and points to ananchorPoint
. Your sublayer will rotate around thisanchorPoint
;For example, to rotate a sublayer on its superview top center point around sublayer's bottom center, use this code:
Where
center
is the center of your layer,rotationAngle
is in radians (positive is counterclockwise), androtationPoint
is the point about which you wish to rotate.center
androtationPoint
are in the coordinate space of the containing view.Check out the CA documentation here.
You want to set the transform to a CATransform3DRotate, for example: