Bug 42098 - UITabBarItem.Appearance.SetTitleTextAttributes broken
Summary: UITabBarItem.Appearance.SetTitleTextAttributes broken
Status: RESOLVED DUPLICATE of bug 42032
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-23 04:17 UTC by Michael Dimoudis
Modified: 2016-06-25 01:59 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Michael Dimoudis 2016-06-23 04:17:01 UTC

I  mentioned this in the forum, not sure if it's been actioned (I saw my first issue was actioned on GitHub). https://forums.xamarin.com/discussion/comment/204646/#Comment_204646

The issue is:
Changing the font on UINavigationBar.Appearance.SetTitleTextAttributes affects the UITabBar too.

If I change the font for UINavigationBar it ALSO affects UITabBar.

UITabBarItem.Appearance.SetTitleTextAttributes does not work anymore.

Below is my code in AppDelegate.cs

UINavigationBar.Appearance.SetTitleTextAttributes (new UITextAttributes {
    TextColor = UIColor.White,
    Font = UIFont.FromName (Theme.IOS_FONT_NAME_LIGHT, 20f)

// Below code is broken now
UITabBarItem.Appearance.SetTitleTextAttributes (new UITextAttributes {
    Font = UIFont.FromName (Theme.IOS_FONT_NAME_NORMAL, 11f)
}, UIControlState.Normal);

UITabBarItem font becomes what UINavigationBar font is, with no way of updating UITabBarItem back to how it should behave.
Comment 1 Samantha Houts [MSFT] 2016-06-24 16:51:18 UTC

*** This bug has been marked as a duplicate of bug 42032 ***
Comment 2 Michael Dimoudis 2016-06-25 00:56:37 UTC
Hi Samantha. My bug relates to a font issue, not color issue. Hence why I created this bug report as I haven't seen it specifically reported yet. 

It relates to the UINavigationBar font also affecting the UITabBarItem font.

Is this font issue related to the duplicate bug you linked to? If it is sorry but I couldn't see font mentioned anywhere. If it's not then I can create a repro project, it should be pretty easy to repro it.
Comment 3 Samantha Houts [MSFT] 2016-06-25 01:59:01 UTC
Hi Michael!

The bug had the same root cause, and it should be resolved by the same fix. Thank you for your report, though. We appreciate the thoroughness!!