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

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube