iphone - orient a uiimageView to the center of the screen -


well have several images of plans that, every time open application, created @ random position. want, every time plan created, nose oriented center of screen, think must calculate angle between center , image , rotation, i'm not sure . can me please ! sorry english i'm french :/

 myimageview.transform = cgaffinetransformmakerotation(30 * m_pi / 180.0);  //this rotate 30 degres. luck! 

to angle need need trig.

http://en.wikipedia.org/wiki/sine


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -