tags:

views:

62

answers:

1

I am creating my first iPhone app which rotates when the user rotates the phone. I have a bit of a weird problem. I have a label with some text in it and when the screen rotates the text sort of deforms. Once in the new position it looks perfectly fine. Has anyone had this problem? I am just using the regular way of shouldAutorotateToInterfaceOrientation to enable rotation. I've been googling the problem but so far it seems to be just me :-O

Also is there a way of forcing the app to load the view in portrait to start with, then once loaded allowing rotation?

Thanks

A: 

It happens because the view's layer contents are drawn at the new size at the start of the animation. You can change behaviour to some extent by setting your view's contentMode (UIViewContentModeCenter might look okay, for example).

The alternative is reflowing/redrawing the text for each frame of the animation, which may be possible but is not going to perform very well.

tc.
Ok thanks for the tip, I'll try that one out :-)