I'm wondering about the Custom TabbedPageRenderer issue. I have created a file MyTabbedPageRenderer.cs
in Xamarin iOS. Everything I set up in this is fine. Until I used
- Everything works fine if I don't use:
[assembly: ExportRenderer(typeof(TabbedPage), typeof(BadgedTabbedPageRenderer))]
- ---> And this is what I want:
Ask for help from everyone. Thanks
CodePudding user response:
I have tested it on my side.The badge effect works well,below is the step that might give you some insights.
As you mentioned, it could be achieved by creating a custom renderer for TabbedPage:
Step1: Move what is in BadgedTabbedPageRenderer.cs here into MyTabbedPageRenderer.cs
Step2: Add [assembly: ExportRenderer(typeof(TabbedPage), typeof(MyTabbedPageRenderer))] in AssemblyInfo.cs and MyTabbedPageRenderer.cs.
Step3: Add two lines in the page you want to achieve the badge effect in the child page.
plugin:TabBadge.BadgeColor="Red"
plugin:TabBadge.BadgeText="1"