views:

49

answers:

0

I have a UIAlertView that has a text field. So when it shows up the keyboard shows up too. To get the alert view in a better place I set a transformation to it:

CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 180);
[alert setTransform:myTransform];

This works fine, as long as the interface orientation does not change. When the interface orientation changes e.g. from portrait to landscape the transformation is somehow removed and parts of the alert view are behind the keyboard.

I tried to apply the transformation before and after the rotation. But nothing happens. Any suggestions how to get positioned the alert correct?

//edit

I tired a now a completely different approach. I don't apply any transformation to the alert view. I only set the center after every rotation. But this has the ugly side effect that the screen rotates and when the rotation is finished the alert moves to it's place. Setting the new center before the rotation does not work :-(