iphone - Rotating UILabels from any position to upright -


i have label rotate using

pieceblack.transform = cgaffinetransformmakerotation((m_pi * (180) / 180.0)); 

and works perfectly, except:

i rotate label during game either right side or upside down. how say, "whatever angle at, go upright." i'm thinking maybe an:

int previousangle = ?; pieceblack.transform = cgaffinetransformmakerotation(degreestoradian(0-previousangle)); 

so guess i'm asking how ask rotation angle. or, alternately, maybe there sort of

pieceblack.transform = cgaffinetransformmakerotation(rotatetoupright); 

from remember transform relative upright position (original), 0.0f? can pieceblack.transform = cgaffinetransformidentity


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

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

url - Querystring manipulation of email Address in PHP -