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