2
votes

My views are not resizing correctly using something like:

self.someview.autoresizingMask = (UIViewAutoresizingFlexibleHeight| UIViewAutoresizingFlexibleWidth);

Using all the possible resizing masks did not solve the problem either. I am running iOS 5.1 on my phone and 6.0 on the simulator but the result is the same either way. I have attached pictures to better describe the problem. How can I set the autoresizingMask so the view ALWAYS fills the screen?

enter image description here

enter image description here

1

1 Answers

0
votes

Check the superview's autoresizesSubviews set to YES and you are not setting incorrect frame for the map at layoutSubviews. I've just added the map view and it resizes as expected.

The resizing mask I used is

UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin