Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to angle a uilabel in ios [duplicate]

i'm creating an iphone app.in that application i want to angle the label according to the attached screen shot. enter image description here (see the $ 120 lable)

The red color image is in the background and i want to angle the uilabel top of it

I have used the transformmethod to rotate . But it does not properly angle it. label shrinks

testLabel.transform = CGAffineTransformMakeRotation(30 * M_PI / 180.0);
like image 637
Mr.G Avatar asked Dec 07 '22 06:12

Mr.G


1 Answers

Try something like this :

label.transform = CGAffineTransformMakeRotation(M_PI / 4); //  45 degree rotation 
like image 105
Kumar KL Avatar answered Dec 21 '22 08:12

Kumar KL