iphone - How to rotate this view to a specific value in radians or degrees? -


What is this 0 to 1 object exactly? For example, how do I rotate the layer at exactly 170 degrees?

  CALayer * viewLayer = myView.layer; CABasicAnimation * Animation = [CABasicAnimation with animation: @ "transform.rotation.z"]; Animation.frame value = [nsnumber number explosion: 0.0 * mopi]; Animation.tv = [NSNumber Number Blast: 1.0 * MOPI]; Animation.duration = 1.0; Animation me = yes; Animation. RepeatCount = 2; Animation. RemovedOnCompletion = No; Animation.philmedia = kCFilModford; [ViewLayer addAnimation: animation fork: @ "transform.rotation.z"]; To not know about cocoa, I would say that toValue 1.0 p specifies the radian rotation. 360 degrees are 2Pi radians, therefore 1.0 PE represents 180 degrees. To get 170 degree rotation I will set the value as  
  animation. Value = [NSNumber Number Blast (170.0 / 180.0) * MOPI];  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -