I am using TabbedPage
in Xamarin forms. In iOS I am not able to update TabbedPage
badge item value. I am using custom renderer for iOS. My code is :
[assembly: ExportRenderer(typeof(TabbedPage), typeof(BottomTabbedPage))]
namespace Graysons.iOS.Renderers
{
public class BottomTabbedPage : TabbedRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
TabBar.UnselectedItemTintColor = UIColor.FromRGB(208, 208, 208);
TabBar.BackgroundColor = UIColor.White;
TabBar.Items[1].BadgeValue = "1";
TabBar.Items[2].BadgeValue = "1";
}
}
}
When app is initialized first time badge value is display. But problem is I want to update badge value when my app is open from background mode(i.e. press Home button and reopen app). Also when in foreground mode I want to update this value. How can I achieve this?