Problem UIview size after re-orientation
First,I am sorry for my poor english...
So, i have a problem with a view which is added on a other one. I am setting size of UIview in IB as 200px/200px I set the center of this view with the center of parent view. Everything is working great at this point. I can see my View in the center of the parent view like i want.
Then I set the - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)inter开发者_如何学编程faceOrientation
And that's working to.
But when i rotate the iphone, the size of the view change to full size, the view don't want to stay in center and go on the top left of the screen and resize as fullscreen...
Can somebody help me with this problem ? Do I have to set the frame and the center after rotate ? That can't be automatic ?
Thank you!
In IB, under the "Autosizing" section, remove the "arrow" that indicates auto width/height of your component.
精彩评论