Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

New in iOS 7: What developers need to know

The revamped UI, dynamic type, new multitasking modes, and 64-bit support point to new classes of apps -- and devices

  • Print
  • Feedback

Page 2 of 4

For arranging an app's UI elements, Apple notes that developers should use Xcode's automatic layout feature as much as possible. That is, let iOS handle the positioning of the UI elements on the screen. This implies that in the future we'll be seeing iOS platforms with different screen sizes.

New in iOS 7: What developers need to know

No more bling: a dialog in iOS 6 (left) compared to its counterpart in iOS 7 (right).

Making text legible
Another way Apple put those extra screen pixels to use was to support better typography. iOS 7 implements dynamic type: typefaces that can scale to all sorts of sizes and still retain their shape and weight. Instead of point sizes or type families, you simply specify a style and let iOS handle the details.

There are a number of style types to choose from, and they parallel those found in HTML tags: Headine 1, Headline 2, Subheadline 1, Subheadline 2, Body, Footnote, Caption 1, and Caption 2. If necessary, you can tweak the size and character spacing, again using semantic terms rather than actual point sizes. Support for dynamic type, ligatures, kerning, and accessibility type sizes are supported throughout the OS.

A new framework, TextKit, implements the dynamic type features. It is a high-level text layout API layered over the low-level CoreText text layout engine. All text-related UI elements (such as UILabel, UITextField, and UITextView) now use TextKit to manage text layout. TextKit can readily arrange styled text into paragraphs, columns, and pages. For complex layouts in which graphics are combined with text, you simply provide a Bezier path that outlines the graphic. TextKit lays out the text and avoids placing text within the path. This goes a long way toward supporting more sophisticated content delivery.

Better multitasking
For the record, iOS was a full-blown multitasking OS from the very beginning. At its core iOS uses the same Mach kernel and BSD libraries as its desktop sibling, OS X. Certain apps, such as Mail, Music, and Clock, ran in the background. However, Apple restricted access of third-party apps to the multitasking capabilities for security purposes, and the early hardware was limited in processing power, memory, and battery life anyway.

In iOS 4, limited multitasking was introduced to support apps that performed background audio playback, background location tracking, and push notifications. In iOS 7, several new background modes have been added: background fetch, remote notifications, and background transfers. The purpose behind these new modes is to keep your app's data current at all times -- even if the data updates come from a remote server.

Background fetch allows an app to fetch information periodically. To implement this, you notify iOS of the fetch interval using a UIApplication method call. Based on the interval, iOS periodically launches your app. Your app then invokes a fetch delegate method that grabs the data and exits.

Remote notification allows your app to respond to messages pushed from a server. iOS launches your app when the notification arrives. The app connects to the server, collects the payload, then exits.


  • Print
  • Feedback