I tried the code
UIbutton *bt = new UIbutton;
bt.Font = UIFont.SystemFontSize(35);
But I keep getting a compilation error "Font size is inaccessible due to protection level." Any workaround?
The error message is far from ideal, but SystemFontSize
is property that returns a float, not a method that returns a UIFont
.
For that you want:
UIButton button = UIButton.FromType (UIButtonType.RoundedRect);
bt.Font = UIFont.SystemFontOfSize (35)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With