渐变颜色的进度条WGradientProgress-备用
今天我们来实现一个iOS平台上的进度条(progress bar or progress view)。这种进度条比APPLE自带的更加漂亮,更加有“B格”。它拥有渐变的颜色,而且这种颜色是动态移动的,这里称之为WGradientProgress。 先来看看我们的目标长什么样子: WGradientProgress的使用方法很简单,主要有展示接口以及隐藏接口,目前显示的位置有两种选择: WProgressPosDown //progress is on the down border of parent view,显示在parent view的底部(主流做法,默认) WProgressPosUp //progress is on the up border of parent view,也就是显示在parent view的顶部 主要的接口有以下几个: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 + (WGradientProgress *)sharedInstance; /** * the main interface to show WGradientProgress obj, position is WProgressPosDown by default. * * @param parentView which