Ios: Get the current system version/uuid id/name/model, iosuuid

Source: Internet
Author: User

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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.