Posts

Showing posts from December, 2021

XAMARIN FORMS TIPS: iOS 15 Transparent TabBar and Safe Area

Image
  iOS 15, transparent TabBar Since the release of iOS 15, some people had regression with their app, particularly because of the TabBar component . In iOS 15, by default (while using Xamarin Forms), the TabBar comes with a Transparent background and the page's content can scroll behind this TabBar. So it's not user friendly  and I presume for all existing apps, it's not beautiful. See the next picture: iOS 15, transparent TabBar You can solve this problem by many ways, but the fastest solution / workaround that I found is the following: => manage iOS SafeArea directly into your XAML to constrain page's content to fit the free space of the page.  You can do that in XAML in 2 lines of code: <?xml version="1.0" encoding="UTF-8" ?> <ContentPage xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" ios:Page.UseSafeArea="True" ... iOS 15 using Page.UseSafeArea = true As Ta

FFImageLoading - display pictures stored in shared assembly

Image
I already talk about the really convenient and powerful lib FFLoadingImage for Xamarin Forms (here: FFLoadingImage for Xamarin Forms (quick overview) ).  This library gives you a lot of tools to display and manage your application's pictures. Loading pictures from a shared assembly You can load pictures from different sources like:  - an HTTP Url  - An iOS or Android embedded resource picture. In this case you will need to duplicate the pictures for each specific platform project.  But did you know that you can also load images from a custom assembly like a SHARED Xamarin Forms assembly ?  It's pretty simple: Set your picture's build action to: Embedded Resource Shared assembly containing your pictures Picture's build action: Embedded Resource Then use the following syntax In your xaml file where you want to display the picture, just use the following syntax. FFLoadingImage library will do the rest to load and display correctly images for each native platforms: