The application which runs smoothly on 4.0.1 when was tried on run on 4.2.1 produced distorted screen i.e., screen somewhat moved to left by 20%. Phones on which iOS 4.0.1 and 4.2.1 are installed are 2 different phones. What could be the problem?
We observed that wherever we have added as subview this problem is occurring.
Thanks,
Satish
From your description, I think it is either that you are not setting the correct
view.autoresizingMaskproperly or there is a subtle change in how views are being laid out.Try setting the frame of the view that moved explicitly and see what happens.
Some related piece of code and/or screenshots would definitely help. Also, is it a UIKit application or a Cocos2D game?
EDIT: Since you can’t provide code (or a stripped-down example version) I’ll just post some code that I’ve been using.
Usually when I add subviews to “fill” a parent view, I had do the following:
If you have done that and it still does not work I believe the problem might lies somewhere else (i.e. have you overridden
layoutSubviewsby any chance? or was the phone jailbroken?)I highly doubt it’ll be a UIKit bug though but it is totally possible.