Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试过代码
UIbutton *bt = new UIbutton; bt.Font = UIFont.SystemFontSize(35);
但我不断收到编译错误“由于保护级别,字体大小无法访问。” 任何解决方法?
错误消息远非理想,而是SystemFontSize返回浮点数的属性,而不是返回 a 的方法UIFont。
SystemFontSize
UIFont
为此,您想要:
UIButton button = UIButton.FromType (UIButtonType.RoundedRect); bt.Font = UIFont.SystemFontOfSize (35)