UIView device rotation iPad/iPhone in Xcode?
I am new in iPhone/iPad development I am getting a problem in rotation. I want to rotate a UIView
according to device rotation iPad/iPhone with full content with the size and position sometimes. Please help me out and give me开发者_开发技巧 sample code or any useful link.
Thanks..
If you want to rotate any view according to device rotation , Just goto Interface Builder and set the view sizes in the size inspector as shown in the following image.
or else, you can set using code,
view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
Go to Interface Builder -> Size Inspector ->AutoSizing
Select all the Outer Bars and Un-select the inner bars. :-)
精彩评论