我有一个 ImageView,我正试图在 Xamarin 中制作 Circular。这很简单,我会用 Core Animation 来完成,但是图像是这样异步下载的:
this.profileImage.InvokeOnMainThread (() => this.profileImage.SetImage (
url: new NSUrl (datum.user.profile_picture)
)
);
我如何使这些图像成为圆形?
最佳答案
这就是我最终解决问题的方式:
this.profileImage.InvokeOnMainThread (() => this.profileImage.SetImage (
url: new NSUrl (datum.user.profile_picture)
)
);
// Make Image Profile Image Circular
CALayer profileImageCircle = profileImage.Layer;
profileImageCircle.CornerRadius = 30;
profileImageCircle.MasksToBounds = true;
关于c# - 使 ImageView 循环,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24332388/