Summary of differences between iOS 6 and earlier versions

Source: Internet
Author: User

1. Adapt to 4 inch screen adaptation.
To adapt to the 4 inch screen, the system creates a default-568h@2x.png image and identifies whether the system supports the 4 inch screen based on the resource. As for other resources, xxx-568h.jpg is not allowed to be used to adapt to the screen. You need to use the code to detect the screen for adaptation.

2. uinavigationviewcontroller changes

As found during the development process today, the initwithrootviewcontroller of this class will eventually call the init method in previous versions. Therefore
During uinavigationviewcontroller, you can directly override the init method to initialize the required attributes of the object. However, the init method is not called on ios6,
Therefore, developers must pay attention to this issue.

3. cfrelease changes
In earlier versions, if cfrelease is allowed to pass in nil, it does not affect our program, but in ios6, in this way, the program directly drops your program crash, so you need to determine whether NIL is safe in the code.

4. uipickerview changes
In earlier versions, calling [_ pickerview selectrow:-1 incomponent: 0 animated: Yes]; is allowed. However, ios6 may cause a crash.

5. Changes in uiactivityindicatorview

In earlier versions, if the startanimating method is called, you only need to add the uiactivityindicatorview to the subview, and the loading is displayed.
But in ios6, the animation is stopped as long as the display queue is removed, especially when this control is added to uitableviewcell, you only need to scroll several cell
Uiactivityindicatorview disappears. To solve this problem, you can determine whether to execute an animation based on the isanimating attribute when adding the display queue.
If yes, call the startanimating method again.

6. Differences in obtaining the address book list

To obtain the address book list after ios6.0, you need to ask the user. After the user's consent, you can obtain the address book user list. In addition, the initialization of abaddressbookref is also changed from the abaddressbookcreate function to the abaddressbookcreatewitexceptions function. The following code is compatible with the previous version to obtain the address book user list.

 
Abaddressbookref addressbook = nil; If ([uidevice currentdevice]. systemversion floatvalue]> = 6.0) {addressbook = abaddressbookcreatewitexceptions (null, null); // execute dispatch_semaphore_t Sema = dispatch_semaphore_create (0); then (addressbook, ^ (bool granted, cferrorref error) {encrypt (SEMA) ;}); encrypt (Sema, dispatch_time_forever); dispatch_release (SEMA);} else {addressbook = abaddressbookcreate ();} nsarray * personarray = (nsarray *) abaddressbookcopyarrayofallpeople (addressbook );

Currently, we only know these changes and will continue to complete these changes.

By panguo

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.