本文整理汇总了C#中UIKit.UIColor.ColorWithAlpha方法的典型用法代码示例。如果您正苦于以下问题:C# UIColor.ColorWithAlpha方法的具体用法?C# UIColor.ColorWithAlpha怎么用?C# UIColor.ColorWithAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIKit.UIColor
的用法示例。
在下文中一共展示了UIColor.ColorWithAlpha方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FAButton
/// <summary>
/// Initializes a new instance of the <see cref="FontAwesomeXamarin.FAButton"/> class.
/// This class extends UIButton. It does set set a default Frame. You must do this yourself
/// </summary>
/// <param name="icon">Icon.</param>
/// <param name="fontColor">Font color.</param>
/// <param name="iconSize">Icon size.</param>
public FAButton (string icon, UIColor fontColor, float iconSize = 20) : base(UIButtonType.System)
{
Icon = icon;
IconSize = iconSize;
this.SetTitleColor (fontColor, UIControlState.Normal);
this.SetTitleColor (fontColor.ColorWithAlpha(100), UIControlState.Highlighted);
}
示例2: FAButton
public FAButton(FA icon, UIColor fontColor, float iconSize = 20)
: base()
{
Icon = icon;
IconSize = iconSize;
SetTitleColor (fontColor, UIControlState.Normal);
SetTitleColor (fontColor.ColorWithAlpha(100), UIControlState.Highlighted);
}
示例3: barcodeOverlayLayer
CAShapeLayer barcodeOverlayLayer (CGPath path, UIColor color)
{
return new CAShapeLayer () {
Path = path,
LineJoin = CAShapeLayer.JoinRound,
LineWidth = 2.0f,
StrokeColor = color.CGColor,
FillColor = color.ColorWithAlpha (0.2f).CGColor
};
}