You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UISegmentedControl.GetTitleTextAttributes method should return the correct UIStringAttributes set using UISegmentedControl.SetTitleTextAttributes in a .NET 8 iOS project, just as in an Xamarin.iOS project.
Actual Behavior:
In .NET 8 iOS, UISegmentedControl.GetTitleTextAttributes returns null for all set properties after setting title text attributes.
In Xamarin.iOS, UISegmentedControl.GetTitleTextAttributes correctly returns the set UITitleAttributes (font and foreground color).
1. Enable nullability.
2. Move Get|SetTitleTextAttributes to generated code.
3. Remove dead code (pre-.NET code paths).
Point 2. fixes#21289, so add tests for this scenario.
Fixes#21289.
1. Enable nullability.
2. Move Get|SetTitleTextAttributes to generated code.
3. Remove dead code (pre-.NET code paths).
Point 2. fixes#21289, so add tests for this scenario.
Fixes#21289.
1. Enable nullability.
2. Move Get|SetTitleTextAttributes to generated code.
3. Remove dead code (pre-.NET code paths).
Point 2. fixes#21289, so add tests for this scenario.
Fixes#21289.
Apple platform
iOS
Framework version
net8.0-*
Affected platform version
VS for Mac 2022, .NET 8.0.303
Description
Expected Behavior:
The
UISegmentedControl.GetTitleTextAttributes
method should return the correct UIStringAttributes set usingUISegmentedControl.SetTitleTextAttributes
in a .NET 8 iOS project, just as in an Xamarin.iOS project.Actual Behavior:
In .NET 8 iOS,
UISegmentedControl.GetTitleTextAttributes
returns null for all set properties after setting title text attributes.In Xamarin.iOS,
UISegmentedControl.GetTitleTextAttributes
correctly returns the set UITitleAttributes (font and foreground color).Steps to Reproduce
I have created a test repository to reproduce this issue. Please find the project to reproduce the bug at the following link: https://github.com/Ferum2704/SegmentedControlTestApp.
Additionally, the property values (such as Font and ForegroundColor) are outputted to the Application Output window
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: