Bill (if you’re reading this - hello! [waves])
In another thread, you wrote:
bq. “Generally speaking its bad news to mess with layers that are under the direct control of a view (such as a UIImageView’s layer …). Instead get the CGImage from the UIImage and make that the contents of your layer.”
Just to be sure I understand … I have a UIImageView (with an image, natch) and I’d like to give it rounded corners and a border without altering the original image. Sometimes it’s inside a scroll view, and other times it’s part of a table view cell.
Is the following ill-advised as a technique to accomplish this in short order? (If so, is there a better way that is just as thrifty?)
CALayer *l = [myUIImageView layer]; l.masksToBounds = YES; l.cornerRadius = 10.0; l.borderWidth = 1.0; l.borderColor = [[UIColor darkGrayColor] CGColor];