Ios: Get the current system version/uuid id/name/model, iosuuid
1. Identify the current system version. Because the statusBar of ios7 is suspended, you need to adapt it to avoid white lines under the screen and different la s of display content for different versions.
<pre name="code" class="objc"> int stateHeight = 0; if ([UIDevice currentDevice].systemVersion.intValue>=7) { stateHeight = 20; }
2. Click UIDevice. There are other system information in this class to obtain information similar to the preceding method but not commonly used. You can use a singleton to view the attributes.
@property(nonatomic,readonly,retain) NSString *name; // e.g. "My iPhone"@property(nonatomic,readonly,retain) NSString *model; // e.g. @"iPhone", @"iPod touch"@property(nonatomic,readonly,retain) NSString *localizedModel; // localized version of model@property(nonatomic,readonly,retain) NSString *systemName; // e.g. @"iOS"@property(nonatomic,readonly,retain) NSString *systemVersion; // e.g. @"4.0"@property(nonatomic,readonly) UIDeviceOrientation orientation; // return current device orientation. this will return UIDeviceOrientationUnknown unless device orientation notifications are being generated.