明天实践一下

 
NSImageView *view = your view;

[view setWantsLayer: YES]; // edit: enable the layer for the view. Thanks omz

view.layer.borderWidth = 1.0;
view.layer.cornerRadius = 8.0;
view.layer.masksToBounds = YES;

You can also modify the borderWidth and borderColor properties

你可能感兴趣的:(properties,layer)