Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Finally learning some advanced tricks. What about adding inset colors to pictures?

$
0
0

Okay, so finally getting over the learning hump and starting to do more advanced things. Simple tricks like:

AvatarImage.Layer.MasksToBounds = true;
AvatarImage.Layer.CornerRadius = 3f;

Which got me on the right track to so something slick like a rounded avatar image for users:

AvatarImage.Layer.MasksToBounds = true;
AvatarImage.Layer.CornerRadius = cell.AvatarImage.Bounds.Size.Width / 2.0f;
AvatarImage.Layer.BorderColor = new CGColor(0.65f, 0.65f, 0.65f);
AvatarImage.Layer.BorderWidth = 2.0f;

What I've seen in other apps, and what I'd like to know how to do is (a) add a bit of a white border on the inside of the image (an inset), and (b) how do you add the subtle shadow effect around the UIImage (or any other view). I've been doing nearly everything through IB and I've done very little with actual drawing... I've been avoiding it. But if I can find a happy medium where I start to add some nice effects, that'd be great.

TIA.

JB


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>