我有一个简单的自定义颜色的UIProgressView,我想失去苹果阴影,这可以做到吗?
[[UIProgressView appearance] setProgressTintColor:[UIColor colorWithRed:5/255 green:72/255 blue:255/255 alpha:1.0]];
[[UIProgressView appearance] setTrackTintColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.000]];谢谢
发布于 2013-02-20 05:46:38
不是你想的那样。你将不得不使用一些非常基本的图像。
你可以看看this的帖子,里面有一些不错的图片,里面有很好的解释。但基本上你必须使用:
[[UIProgressView appearance] setProgressImage:[[UIImage imageNamed:@"ProgressImage"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)]];
[[UIProgressView appearance] setTrackImage:[[UIImage imageNamed:@"TrackImage"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)]];使用您希望使用的任何颜色图像。如果你只是想要直接的颜色,那么就做一些简单的单色块,或者疯狂地使用一些渐变。
https://stackoverflow.com/questions/14967606
复制相似问题