Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Custom renderer for TabbedPage, allowing to show Badges on tabs in iOS

$
0
0

Hi there. I am attempting to do my first custom renderer of a TabbedPage, and am having problem setting the badges in iOS.
This is certainly due to my very limited knowledge of iOS - but I am attempting to learn :)

I have succesfully made the renderer and it is called withhout problems, It currently simply looks like this:


public class BadgeTabbedPageRenderer : TabbedRenderer
{
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
}
}

The problem is that I have no idea of how to set the badgeinfo from here. My tabbedpage has 2 tabs.
According to the xamarin tutorials, the iOS native control class for a TabbedPage is an "UIVIew",

However, the TabbedRenderer baseclass does not provide access to a "Control" property which is where controls are usually accessed in tutorials.

I assume something is wrong in my reasoning, and would be really glad if someone could correct me and tell me what to do in order to set the badges.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>