我用https://github.com/kelan/yrk-spinning-progress-indicator得到一个白色的旋转器。请注意,这不是NSProgressIndicator的子类,而是自定义NSView。
问题是,这个自定义视图的角显示为白色,而不仅仅是一个清晰的背景。您可以在这张图片中看到这个:

这是我的代码:
[_statusProgressIndicator setColor:[NSColor whiteColor]];
[_statusProgressIndicator setIndeterminate:YES];
[_statusProgressIndicator setBackgroundColor:[NSColor clearColor]];
[_statusProgressIndicator setDrawsBackground:YES];
[_statusProgressIndicator startAnimation:self];我也试过:
[_statusProgressIndicator setDrawsBackground:NO];但它也有同样的效果。
有什么办法解决这个问题吗?
发布于 2014-01-26 01:50:25
我下载了代码并运行了示例,原始代码提供的旋转器中没有圆角。
我注意到在你的形象中,你的观点包含旋转器也有圆角?您是否在setCornerRadius:方法中使用层背景视图?
如果是这样的话,它看起来像旋转子视图也有这个属性集,因为它看起来像旋转器和包含的视图有相同大小的圆角。
特别是将旋转器视图的角半径设置为0?
https://stackoverflow.com/questions/21356284
复制相似问题