Possible Duplicate:
Can I rotate a UIView without the black bars?
I want the labels on my UIView to rotate (and they do) but I’ve set the background to a color other than black. When I rotate you can see the view’s rectangle rotate against a black background. How can I keep the UIView‘s background still yet allow the rest of the subviews to rotate normally? And what is that black background behind everything? Do I have access to it?
I’m not sure I fully understand the question. What I think your question is (if I’m misunderstanding please clarify where I’m getting the question wrong):
I think the only ways to resolve this are either:
A) Make the view you’re rotating larger than the screen so that when you rotate the parent view isn’t visible. If you do this make sure the parent view isn’t set to clip it’s subviews otherwise you won’t see any difference after resizing.
OR
B) Make the parent view’s background color match the color of the view you’re rotating. If you don’t want to permanently alter the background color of the parent view you can always change the color when you start the animation and revert to the original color when done.
P.S. – I think the “black background behind everything” is the background color of your app’s UIWindow. If you want to change that you can do the following (assuming your app delegate has a window property defined but if you used one of the standard Xcode templates to create your app it should):