如何在Xamarin中实现UIImage.withTintColor的等效功能?

问题描述 投票:0回答:1

在Apple文档中,UIImage class has method withTintColor

但是,等效于Xamarin.iOS的UIImage class没有此方法。

有没有办法做到这一点?

(我不认为设置UIImageView.TintColor的另一种方法对我有帮助,因为我需要以编程方式将着色的图像绘制到另一个位图中。]

xamarin.ios uiimage
1个回答
0
投票

Xamarin将withTintColor方法重命名为ApplyTintColor

var tintedImage = srcImage.ApplyTintColor(myUIColor);
© www.soinside.com 2019 - 2024. All rights reserved.