Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-06-2008, 10:51 PM   #3 (permalink)
jeff_lamarche
New Member
 
Join Date: Apr 2008
Posts: 420
jeff_lamarche is an unknown quantity at this point
Send a message via AIM to jeff_lamarche Send a message via Yahoo to jeff_lamarche
Default

Quote:
Originally Posted by Kenrik View Post
You could just use a image...

Oh, please, no. There's no need to kluge it with an image.

Simply set the transform property of the label to the angle you need. First, here's a macro for converting from degrees to radians. The function we're going to use in a minute requires radians, but I don't think in radians, so I use this:

Code:
#define degreesToRadian(x) (M_PI * x / 180.0)
Now, just do this:

Code:
myLabel.transform = CGAffineTransformMakeRotation(degreesToRadian(43));
Just change 43 to whatever angle you want. You may need to adjust the x and y location after you do this to make it fit nicely.
__________________
Check out my iPhone Dev Blog
You can send me e-mail at my forum username at mac dot com.
jeff_lamarche is offline   Reply With Quote
 

» Advertisements
» Online Users: 352
11 members and 341 guests
daud18, evilmatt10, ipodphone, jobsindubaiuae, KarlJay, myrnanu59, Newbie123, NSString, Objective Zero, Pudding, TomTool
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,564
Threads: 94,079
Posts: 402,747
Top Poster: BrianSlick (7,990)
Welcome to our newest member, myrnanu59
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:34 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.