Xamarin Leverages New iOS 11 Functionality

The Xamarin team at Microsoft has been updating its cross-platform development software to accommodate the new functionality in Apple's iOS 11, publishing guidance along the way.

After earlier posting "Visual Design Updates" to explore new features in iOS 11 and how to update the Xamarin.iOS variant of its software, the Xamarin team recently published a post for Xamarin.Forms, an additional layer built over Xamarin.iOS and Xamarin.Android in order to provide common UI functionality across both platforms (and Windows).

The new guidance explains how the team made the new iOS functionality even easier to use with Xamarin.Forms, focusing on using the SafeArea layout guides defined in iOS 11 and the new capabilities to use larger titles for items in the navigation bar.

Apple's SafeArea guidance instructs developers how to make sure their content appears correctly in the visible area of a screen, for example to avoid the "notch" encountered on an iPhone X screen in landscape mode.

A previously published post explained how to work within SafeArea constraints for iPhone X, a process that's said to be made even easier in Xamarin.Forms.

"In the 2.4.0 Service Release 4, we’re introducing a platform-specific for pages to use the safe area layout guides to create appropriate insets in your pages," said Xamarin developer David Ortinau in a blog post Friday.

A "platform-specific" lets a developer leverage functionality that's only available on a specific platform, obviating the need to create custom renderers or effects. To use the SafeArea platform-specific, developers need only opt in by setting a flag in a class constructor or in the backing XAML code.

While "some sensible defaults" are provided for inset values to configure the feature, Ortinau said developers can implement finer control over settings that control specifications such as padding.

Augmented Reality Highlights New iOS 11 Functionality
[Click on image for larger view.] Augmented Reality Highlights New iOS 11 Functionality (source: Microsoft).

A platform-specific also eases the implementation of large titles.

"Part of the new iOS 11 update is support for a larger display of your titles that appear in the navigation bar," Ortinau said. "As with safe areas, you can now use a platform-specific to opt-in to this visual design pattern. When enabled, the title that usually appears in the center of the navigation bar will appear left aligned and, of course, larger. In landscape the title will return to the center to optimize the view visible for content."

Again, Xamarin.Forms developers can opt in to display the large titles and can configure their display with three options: always, automatic (the behavior is inherited from the previous page in the navigation stack) or never.

To use these new platform-specifics, developers can go to GitHub for the 2.4.0 Service Release 4 code as part of a Web preview.

After the features are put through their paces by community developers, that build will be promoted to general availability via NuGet if no changes are needed.

The previously published guidance for Xamarin.iOS details working with UIKit and other updates concerning the navigation bar, search bar, table views and more.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • VS Code Java Team Details 5 Best Dev Practices

    Microsoft's Visual Studio Code team for Java development added a new Coding Pack for Java installer and detailed best practices for setting up a development environment.

  • Binary Classification Using PyTorch: Defining a Network

    Dr. James McCaffrey of Microsoft Research tackles how to define a network in the second of a series of four articles that present a complete end-to-end production-quality example of binary classification using a PyTorch neural network, including a full Python code sample and data files.

  • Blazor Debugging Boosted in .NET 5 RC 2

    In highlighting updates to ASP.NET Core in the just-launched second and final Release Candidate of .NET 5, Microsoft pointed out better debugging for Blazor, the red-hot project that allows for C# coding of web projects.

  • Block Stack

    Final Go-Live .NET 5 Release Candidate Ships Ahead of Nov. 10 Debut

    Having been deemed "feature complete" and "near final" and "go live" for some time now, .NET 5 is out in a second and final Release Candidate, scheduled for a Nov. 10 debut during .NET Conf 2020.

  • Edge Browser Dev Tools for VS Code Now Generally Available

    Microsoft has moved its Edge browser development tools for Visual Studio Code from preview to general availability, providing in-editor web site debugging and other functionality.

Upcoming Events