Pra*_*rad 2 c# uiimageview xamarin.ios ios xamarin
我有一个ImageView,我试图在Xamarin中制作Circular.这很简单,我会用Core Animation完成它,但是像这样异步下载图像:
this.profileImage.InvokeOnMainThread (() => this.profileImage.SetImage (
url: new NSUrl (datum.user.profile_picture)
)
);
Run Code Online (Sandbox Code Playgroud)
我如何将这些图像制作成圆形?
这就是我如何解决我的问题:
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;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3119 次 |
| 最近记录: |