What to watch out for when transitioning to iOS 5

前端 未结 1 1657
轮回少年
轮回少年 2021-02-01 16:54

Summary: Can you add to my checklist of things to watch out for when migrating to iOS 5? StackOverflow has been invaluable as I\'ve worked on upgradin

1条回答
  •  孤独总比滥情好
    2021-02-01 17:14

    1/ Modal controllers behave differently, if you were changing their size. If you need modal dialog of a different size, consider using iOS 5 child view controllers.

    2/ For a table, if you were returning nil section header and positive height, in iOS 4, the header was hidden. In iOS 5, you have to return zero height for nil headers.

    3/ UDID is deprecated. You can use CFUUIDCreate to create a unique id and save it into your settings but be aware that a device data can be backed up and then restored to another device, leaving you with two devices with the same id. I solved the situation by saving my id into keychain with attribute kSecAttrAccessibleWhenUnlockedThisDeviceOnly.

    About your list: [super viewDidUnload] should be always called as the last statement in your viewDidUnload. The logic is the same as in [super dealloc]. Note, that you should also call [self viewDidUnload] in your dealloc (if you don't already release your memory there) because it is not called implicitly (although sometimes it is).

    From my experiments, leak detection in Instruments don't report leaks on properties which are synthesized without assigning a property name.

    0 讨论(0)
提交回复
热议问题