-
Notifications
You must be signed in to change notification settings - Fork 548
Description
Apple platform
iOS
Framework version
net8.0-*
Affected platform version
.NET 8.0.100 18.0.8303
Description
The return type of IUIContentConfiguration.MakeContentView() is simply IUIContentView. By contrast, in Swift it is UIView & UIContentView (and similarly in Objective-C), so we're missing the idea that the return type is not just an object that conforms to UIContentView, but it's specifically a UIView. Attempting to cast the result of MakeContentView() to UIView fails, which is also incorrect. This makes the composability aspect of content configurations unusable in C#: you can't take one configuration's view and embed it inside another.
Steps to Reproduce
- Attempt to cast the result of a
MakeContentView()call toUIView. - The result is null, which is incorrect. The result is always a
UIView.
Did you find any workaround?
I haven't tried it yet, but I could make a subclass of UIView that implements IUIContentView, and return that from my custom content configurations. I think that would get around the casting issue for those cases, but it would not help for when I want to embed a system content configuration inside a custom one.
Relevant log output
No response