IOS 11 support in Xamarin Forms + Prism

iOS 11 has a new UI design which include two main changes: Safe area and large titles. The importance of adding support to this in our apps is to respect the platform conventions and also if you don’t add the Safe area it won’t respect the borders in iPhoneX.

Some time ago David Ortinau posted a guide of how to add it in Xamarin Forms. In this article I’m going to show you how to add it when using Prism.

Let’s do it step by step

Adding it in Prism applications is almost the same of adding it in a simple Xforms app, the difference is that in order to achieve the large title, you will have to create a new custom NavigationPage class.

Adding Large Title

1-Create a new file and extend from NavigationPage

2-Instead of registering xamarin forms default  navigation page, register your new CustomNavigationPage and use it in your navigation paths.

NOTE: If you don’t want to add it an specific page, in the code behind of your page you can add:

 

Adding Safe area

To add the safe area

That’s all for now, you can find the full sample here. 

Happy coding! 🙂

References

 

You may also like