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.
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.