[Graphics] UIColor created with component values far outside the expected range, Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.

用了别人的代码,一直总有一个报错,一开始没注意,最近项目快完期了,得处理下警告之类的东西,

后面发现之前那个大神代码是这样写的

    [SVProgressHUD setBackgroundColor:[UIColor colorWithRed:255 green:255 blue:255 alpha:1.0]];

改成就行了

    [SVProgressHUD setBackgroundColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:1.0]];

或者

    [SVProgressHUD setBackgroundColor:[UIColor colorWithRed:255/255 green:255/255 blue:255/255 alpha:1.0]];

其实不就是白色吗,

    [SVProgressHUD setBackgroundColor:[UIColor whiteColor]];

非得装逼写那么长一串,结果还写错了,真是,一点UI都能玩成这样……实在没话说

原文地址:https://www.cnblogs.com/songxing10000/p/6297542.html