Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove tinting from iOS TabBar

I have a TabBar at the bottom of my view that I dont want any tinting on. As od iOS 7, iOS automatically tints the icons blue and I dont want this to happen.

I have tried writing a custom renderer but setting the tint colour to clear simply removes the icon (should have seen that one coming).

protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
    base.OnElementChanged(e);
    TabBar.TintColor = UIKit.UIColor.Clear;
}

I want to have an image for the tab item without any tinting. How can this be done?

like image 532
David Pilkington Avatar asked Nov 28 '22 23:11

David Pilkington


1 Answers

If anyone still looking for solution, you can go to your image assets, select all your tab icons (including Selected style), and in its options choose Render As: Original Image instead of Default.

No additional action is required, you can select any tint color in your TabView (or Image View) but it will not affect it any way. Also you can do it programmatically, but this is bit more simpler.

Although I am not sure since which iOS this function is available, it might be helpful to others with similar issue.

enter image description here

like image 199
Nomad Developer Avatar answered Dec 04 '22 20:12

Nomad Developer