我想改变拉动刷新后出现的加载图标的颜色这是我的指示器样式的代码我认为这与我想做的事情有关但我没有编写代码,它来自:{{3 }}
-(void)setActivityIndicatorViewStyle: (UIActivityIndicatorViewStyle)activityIndicatorViewStyle
{
if ([_activity isKindOfClass:[UIActivityIndicatorView class]]) {
[(UIActivityIndicatorView *)_activity setActivityIndicatorViewStyle:activityIndicatorViewStyle];
}
}
- (UIActivityIndicatorViewStyle)activityIndicatorViewStyle
{
if ([_activity isKindOfClass:[UIActivityIndicatorView class]]) {
return [(UIActivityIndicatorView *)_activity activityIndicatorViewStyle];
}
return 0;
}
- (void)setActivityIndicatorViewColor:(UIColor *)activityIndicatorViewColor
{
if ([_activity isKindOfClass:[UIActivityIndicatorView class]] && [_activity respondsToSelector:@selector(setColor:)]) {
[(UIActivityIndicatorView *)_activity setColor:activityIndicatorViewColor];
}
}
- (UIColor *)activityIndicatorViewColor
{
if ([_activity isKindOfClass:[UIActivityIndicatorView class]] && [_activity respondsToSelector:@selector(color)]) {
return [(UIActivityIndicatorView *)_activity color];
}
return nil;
}
答案 0 :(得分:1)
在文件ODRefreshControl.m中,更改
中的以下行- (id)initInScrollView:(UIScrollView *)scrollView activityIndicatorView:(UIView *)activity
这
_activity = activity ? activity : [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
到
_activity = activity ? activity : [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];