【发布时间】:2012-11-07 09:04:55
【问题描述】:
为什么外观设置不适用于我在 monotouch 6 中的控件? 我正在设置属性
UILabel.Appearance.Font = UIFont.FromName("Fontname", 16);
UILabel.Appearance.BackgroundColor = UIColor.Clear;
但是当我创建一个标签时
UILabel mLabel = new UILabel(new RectangleF(0, 0, width, height));
它看起来像默认标签。白色背景和深色文本。 如果我直接设置属性,它工作正常
mLabel.Font = UIFont.FromName("Fontname", 16);
mLabel.BackgroundColor = UIColor.Clear;
给我一个正确的结果。
【问题讨论】:
标签: ios xamarin.ios uilabel uiappearance