Monday, July 18, 2011

What's New in iOS 5 sdk

The key developer-related features introduced in iOS 5.0 (Official doc):

1. iCloud

2. Storyboard

Storyboard is not xib. "A storyboard file captures your entire user interface in one place and lets you define both the individual view controllers and the transitions between those view controllers." I think It sounds like Keynote or Powerpoint. You can design every page's content and the transition between pages.

3. Newsstand (for magazines and newspapers)

4. New Frameworks

- GLKit (Game Library Kit?). The GLKit framework (GLKit.framework) contains a set of Objective-C based utility classes that simplify the effort required to create an OpenGL ES 2.0 application.

- Core Image. A powerful set of built-in filters for manipulating video and still images, such as touching up, correcting photos, face and feature detection.

- Twitter.

- Accounts. A single sign-on model for certain user accounts. Apps can use it to access twitter account.

- Generic Security Services.

5. Automatic Reference Counting (ARC).

Actually, it is a new feature of the language and the compiler. It helps you manage the objects lifetime and memory. There are some restrictions to use ARC:

1. You don't need to (and are not allowed to) call retain/release/autorelease.

2. You don't need to (but can) implement your dealloc method.

3. You can't use NSAutoreleasePool objects. Actually, they are replaced by @autoreleasepool keyword.

3. You can't define object points in C structures.

4. You can't directly cast between object and nonobject types (for example, between id and void*).

For more information about ARC itself, see Programming With ARC.

1 comment:

Anonymous said...

I wrote my code for the custom keyboard which use NSAutoreleasePool. Here is my code:

NSAutoreleasePool* pool = [NSAutoreleasePool new];]
[landscapeArchiver release];

The NSautoreleasePool and release/drain are not available in iOS 5. What can I replace with the above?