I have an issue with a UILabel acting funny when I try to rotate it. I am programmatically creating the label in code to be in the center of my view and am currently hard setting the values of it. What I am trying to do is get text to be rotated and set on the left side of the screen so that it is aligned with the left border. If I do textLabel.transform = CGAffineTransformMakeRotation(M_PI_2); then the text is rotated properly but is upside down. However, when I do textY.transform = CGAffineTransformMakeRotation(M_PI_4); then the text looks to be rotated and displayed on an angle instead of being flush with the border. I have pasted the full code snippet below and appreciate any advice.
CGRect labelFrame = CGRectMake(0, self.view.frame.size.height / 2, 40, 40);
UILabel *text = [[UILabel alloc] initWithFrame:labelFrame];
text.transform = CGAffineTransformMakeRotation(M_PI_2);
text.backgroundColor = [UIColor clearColor];
text.text = @"Home";
[self.view addSubview:text];
[self.view bringSubviewToFront:text];
If you want the text to read from bottom to top
You can do so like this: