Reputation: 357
I have a universal app. I want my app to work in both orientation modes in iPhone but in portrait mode only for iPad,
How can this be done?
setOrientationtion
is not responding in iOS5.
Upvotes: 1
Views: 347
Reputation: 118
You can set up orientation for each device in Xcode's project settings editor.
Upvotes: 2
Reputation: 4712
Upvotes: 2
Reputation: 6218
This will help you:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
// The device is an iPad running iPhone 3.2 or later.
// Rotate to landscape
}
else {
// The device is an iPhone or iPod touch.
// Rotate to portrait
}
Upvotes: 2
Reputation: 818
Try the shouldAutorotateToInterfaceOrientation: method for ios5 and before.
Upvotes: 0