I have struck with NSButton Title visibility. What I have done is, I have taken CALayer and arrange background color, corner radius and border width for that layer. Finally this layer is set to the NSButton Layer But after doing this Title of the NSButton is not visible. Please suggest any idea. Thanks in advance.
Here my code, What I have tried.
var wordButton = new NSButton(new CGRect(20, 0, tableColumn.Width - 70, 30));
CALayer layer = new CALayer();
layer.CornerRadius = 5f;
layer.BorderWidth = 1f;
layer.BackgroundColor = NSColor.FromRgba(0.70f, 0.87f, 0.86f, 1.0f).CGColor;
wordButton.WantsLayer = true;
wordButton.Layer = layer;
wordButton.Title = "Test";
wordButton.SetButtonType(NSButtonType.MomentaryPushIn);
wordButton.BezelStyle = NSBezelStyle.SmallSquare;
