Can anyone advise me on how I can create a border around photos (like what you see in the screen shot below)? It seems like there is a thin grey border and a drop shadow at the back.
Appreciate any advise here.
Simple way: wrap the photo into a UIImageView
, setup the borderColor
, cornerRadius
, shadowColor
, shadowOffset
, shadowPath
etc. for the layer of the UIImageView.
Complex way: subclass the UIView and draw the border and shadow by yourself in -drawRect:
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With