Wrap an Objective C UIView in a ui.View
-
If I wanted to create new
ui.View
subclasses for Objective-CUIView
classes, like many of the built-in classes do, what's involved?
-
Best bet is to create a ui.View, add the UIView as a subview. Set the autoresizingMask of the contained to represent flex(). Maybe wrap some attributes in @properties of your custom ui.View to do things to the contained UIview -- thinks like background color perhaps, but not attributes like frame, which you want controlled at the ui.View level.
-
Right. I noticed this is how @omz did it in that MapView from a while back. I guess there's a different way to do it but not from Python. Thanks.