Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
From what I can tell reading docs and looking at examples, they are both attempting to wrap a dictionary full of various options that control text rendering.
The issue is that UIStringAttributes appears to be up to date, and UITextAttributes appears to be old and broken. Everywhere that takes a UITextAttributes class should be updated to also accept a UIStringAttributes class.
Could you please provide us the docs and examples that you are referring to? So that we can have look at this.
Do you guys need docs? Its pretty clear that the issue is you are wrapping an NSDictionary improperly. Happy to provide docs if necessary, however it doesn't seem like it would be, and I'd prefer not to waste my time.
Let me know.
Hi Todd, I've assigned this to somebody who will confirm the bug, no need to update. Thanks!
Hi Todd, UITextAttributes works fine for me. Here you can find sample code of how it can be used:
Please let me know in what case UITextAttributes works improperly for you. Thanks.
Yes it works fine, the issue is it doesn't have all the properties that you should be able to use, where as UIStringAttributes does. Both of these classes represent the same UIKit objects (NSDictionaries that have specific keys that are used to control text rendering properties). However, UITextAttributes doesn't appear to be complete, and it looks like an older hand-created wrapper, where as UIStringAttributes appears to be the proper complete wrapper.
Does that make sense?
Set "CONFIRMED" to this bug. Think we can do something about it. Thanks again!
Some history can be found here: http://tirania.org/monomac/archive/2012/Aug-24.html
UITextAttributes is exposed in 4 classes: UIBarItem, UINavigationBar, UISearchBar and UISegmentedControl, and all 4 cases Apple's documentation says exactly the same about the corresponding properties: "The attributes dictionary can specify the font, text color, text shadow color, and text shadow offset for the title in the text attributes dictionary"
And that's exactly what UITextAttributes does, it allows you to specify font, text color, text shadow color and text shadow offset (and nothing else). Exactly which properties should be allowed in addition to those?
We could allow UIStringAttributes in addition to UITextAttributes in all API that already takes UITextAttributes, but I'm not sure it would be clearer, since you'd be able to set properties that won't do anything (at least according to Apple's documentation).