I am trying to add a subview to a view by calling the
AddSubview method on view. Since I want the View's and Subviews' background to be of custom colour, I customised their appearance by setting
WantsLayer to true and changing the
Layer.BackgroundColor property. It works fine - the subview gets added to the view with the desired background. But I am having strange issues as I am seeing blocks around the elements -
As you can see, I can see blocks of black colour around Progress Indicator and Loading label. I can even see a block of View's label (top left) - that is actually behind the subview. I guess the issue is because of the layer enabling.
P.S.: I know this is not a Xamarin.Mac specific question, but I have searched a lot about this issue and still not able to find anything. Posting here hoping that I would get to know what the issue could be. The app is a macOS menu bar app. The subview is loaded from a .xib file.