Top 10 Developer Features in iOS 6

The new features of iOS 6 from a user’s point of view are well documented and well reviewed so I don’t intend to go over the same ground here.

Having spent a large part of the last couple of weeks watching WWDC 2012 videos and playing with some of the new features, this is my list of features that are of most interest to us as iOS developers.

1. Activity View Controller

If you’ve upgraded your device to iOS 6 you’ve probably seen these in the standard iOS 6 apps. It’s a new consistent way to display what would have been displayed in the past using action sheets. It provides your gateway to standard system activities, like sending mail, posting to Facebook and printing, but you can also create your own activities.

2. Accessory Actions

One of the limitations of storyboards with iOS 5 was that it wasn’t possible to trigger a segue from an accessory button in a table view cell. iOS 6 adds an accessory action that means it’s no longer necessary to implement write code to make an accessory button trigger a segue.

3. Autolayout

iOS 6 introduces a flexible, powerful and downright confusing layout system to replace the springs and struts that we are familiar with from iOS 5 storyboards and, before that, XIBs. There are three WWDC videos on the topic, so we can’t complain about lack of documentation! I’ve not really got to grips with this yet, but it looks pretty useful.

4. Autorotation

Finally those four buttons on the summary page of an Xcode project do something useful! There’s no need to write any code to enable autorotation in your view controllers — it just works. The buttons have sensible defaults in new projects too, so you don’t even need to press them.

5. Collection Views

Think table view laid out as a grid and you will be pretty close to understanding a collection view. This one has huge potential for creating interesting user interfaces.

6. Cancellable Segues

In iOS 5, anything you wired up as a segue in a storyboard was going to fire when the source was invoked, e.g. a button pressed or a table view cell selected. With the new shouldPerformSegueWithIdentifier:sender: method, you get a chance to veto the segue.

7. Deprecated viewDidUnload

We were always advised to be good citizens of iOS by removing objects in viewDidUnload that we could recreate in viewDidLoad. Apple have done some analysis of the benefit of this compared to the bugs it caused and decided that the benefit is tiny in the whole scheme of things. So there’s no need to feel guilty about ignoring the possibility of freeing up objects in viewDidUnload any more — it’s never called!

8. Exit Segues

One of the hardest things to explain on Learning Tree’s Building iPhone® and iPad® Applications: Extended Features course is the concept of delegates. Delegation is still an important pattern in iOS and won’t go away anytime soon, but apps written for iOS 6 can simplify things like modal views by using exit segues. Instead of having to wire everything up with a delegate protocol, your done and cancel buttons can search back through the sequence of presented view controllers to find a method that dismisses them.

9. Modern Objective-C

I’ve already written a post covering features in the Xcode 4.4 release but it’s been extended in Xcode 4.5 and iOS 6 with simplified array and dictionary subscripting.

10. State Restoration

iOS 6 adds support for state restoration in your app so that it can carry on seamlessly even if it was killed while backgrounded. This is a feature that will not be obvious to most iOS 6 users but could really make your applications feel like they are ready to go all the time.

So iOS 6 provides some great features for developers as well as users. Just bear in mind that some of these will restrict your app to devices running iOS 6, so consider your target market before putting them to use.

Richard Senior

Type to search

Do you mean "" ?

Sorry, no results were found for your query.

Please check your spelling and try your search again.