News

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

Featured

  • How to Do Naive Bayes with Numeric Data Using C#

    Dr. James McCaffrey of Microsoft Research uses a full code sample and screenshots to demonstrate how to create a naive Bayes classification system when the predictor values are numeric, using the C# language without any special code libraries.

  • Vortex

    Open Source 'Infrastructure-as-Code' SDK Adds .NET Core Support for Working with Azure

    Pulumi, known for its "Infrastructure-as-Code" cloud development tooling, has added support for .NET Core, letting .NET-centric developers use C#, F# and VB.NET to create, deploy, and manage Azure infrastructure.

  • .NET Framework Not Forgotten: Repair Tool Updated

    Even though Microsoft's development focus has shifted to the open-source, cross-platform .NET Core initiative -- with the aging, traditional, Windows-only .NET Framework relegated primarily to fixes and maintenance such as quality and reliability improvements -- the latter is still getting some other attention, as exemplified in a repair tool update.

  • How to Work with C# Vectors and Matrices for Machine Learning

    Here's a hands-on tutorial from bona-fide data scientist Dr. James McCaffrey of Microsoft Research to get you up to speed with machine learning development using C#, complete with code listings and graphics.

  • Sign

    Working with Claims to Authorize Users in ASP.NET Core and Blazor

    When you need to integrate authorizing the user to perform some activity (or just want to retrieve information about the current user), you need to work with the ClaimsPrincipal’s Claims objects. Here’s everything you might want to do.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events