par*_*par 28
我不知道这是否有效,所以请尝试一下,我们会交叉.在iPhone上你可以使用CALayer
任何UIView
(NSView
iOS中的对应物)来获得圆角.基于该参考文档它似乎是NSView
支持这一点,但再次你也来试试吧.如果有效,请告诉我.
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;
Run Code Online (Sandbox Code Playgroud)
您还可以修改borderWidth和borderColor
属性.