userInterfaceIdiom
The style of interface to use on the current device. (read-only)
@property(nonatomic,readonly) UIUserInterfaceIdiom userInterfaceIdiom
discussion
For universal applications,you can use this property to tailor the behavior of your application for a specific type of device. For example,iPhone and iPad devices have different screen sizes,so you might want to create different views and controls based on the type of the current device.
Availability
Available in iOS 3.2 and later.
Declared In
The style of interface to use on the current device. (read-only)
@property(nonatomic,readonly) UIUserInterfaceIdiom userInterfaceIdiom
discussion
For universal applications,you can use this property to tailor the behavior of your application for a specific type of device. For example,iPhone and iPad devices have different screen sizes,so you might want to create different views and controls based on the type of the current device.
Availability
Available in iOS 3.2 and later.
Declared In
UIDevice.h
BOOL iPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;