user174761
user174761

Reputation: 1829

View shows only half of width in landscape mode

I have one view controller,in that i have 1 UIButton ,when i click on that button one view opens ,but when i move it to landscape mode at that time the view shows only half of width not full.what should i do?????

Thanks and welcome for answers

Upvotes: 0

Views: 267

Answers (1)

mrueg
mrueg

Reputation: 8225

You may need to set the autoresizing properties, i.e.

myView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

You should probably call setNeedsDisplay on the view after changing the orientation.

Upvotes: 1

Related Questions