cool hit counter UIProgressView current progress display rounded corners_Intefrankly

UIProgressView current progress display rounded corners


First look at what a normal UIProgressView should look like

WechatIMG17.jpeg

But here's the demand

WechatIMG18.jpeg

That is, set the trackTintColor of the UIProgressView to transparent. If the progress bar is not filled, the effect will look like this

WechatIMG19.jpeg

With rounded corners on the left and no rounded corners on the right, this obviously doesn't achieve anything.

Don't worry let's make this happen

 for (UIImageView * imageview in self.progress.subviews) {
        imageview.layer.cornerRadius = 2;
        imageview.clipsToBounds = YES;
    }

That's all it takes to achieve a rounded corner for the current progress bar.

Of course you can also write a custom control of your own. But why waste time writing one yourself when UIProgressView can implement it.


Recommended>>
1、Do you know all the versions of Windows
2、2017 Hangzhou Tourism Annual Big Data Report
3、Oriental Wealth Click to get your wealth code
4、Hundred win chess poker bar chess love to play chess ule chess open win tips
5、Hackers ransack US ATMs as banks go digital at risk

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号