Take Advantage of iOS 7’s New Features

On Sept. 18, Apple formally began distributing iOS 7 to users. Within one month, iOS 7 was running on 69.3 percent of iOS devices, according to app monitoring company Fiksu. On Sept. 20, Apple began selling the new iPhone 5s and 5c. While excitement surrounds the release of any new operating system, Apple creates additional excitement for developers, due to the rapid uptake of each new version of iOS.

With iOS 7, Apple has provided a number of new features worth getting to know. Since this column is called “Cross-Platform C#,” the question of the length of time it takes Xamarin to provide support for new features comes up frequently. There’s good news on that front, because Xamarin has provided same-day support for the latest version of iOS. This article will take a look at some of these new iOS features.

Controls have the same functionality as in iOS 6. A UIButton is still a UIButton, a UIPicker is still a UIPicker, and a UITextbox is still a UITextBox. The biggest difference in controls is the general look. For example, with iOS 6 and earlier, controls typically had a border. From a programming standpoint, there isn’t much difference between the controls; the only one I’ve uncovered is when programmatically creating controls.

Previously, UIButtons were created with the type UIButtonType.RoundedRect, like this:

var btn = UIButton.FromType(UIButtonType.RoundedRect);

With iOS 7, the UIButton is created like this:

var btn = UIButton.FromType(UIButtonType.System);

Thankfully, the UIButtonType.System maps to the UIButtonType.RoundedRect at this time.

View Transitions
With iOS 7, by default, ViewControllers are loaded up from the bottom of the screen when a call to PresentViewController is made. When a ViewController is unloaded via a call to DismissViewController, the ViewController will be moved down and removed from the screen. This goes with the general view of information being placed on the screen as well as removed. There is also a series of customizations that can be performed. Figure 1 shows a transition occurring between two controllers in the iOS simulator.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s