Nitesh M
Nitesh M

Reputation: 211

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..

Upvotes: 0

Views: 5389

Answers (2)

Satya
Satya

Reputation: 3330

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.

alt text

or else, you can set using code,

view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;

Upvotes: 1

Akshay
Akshay

Reputation: 2983

Go to Interface Builder -> Size Inspector ->AutoSizing

Select all the Outer Bars and Un-select the inner bars. :-)

Upvotes: 0

Related Questions