iPhone ProgressBar [英] iPhone ProgressBar

查看:84
本文介绍了iPhone ProgressBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在iPhone SDK中更改UIProgressBar的颜色和大小

How can I change the color as well as size of UIProgressBar in iPhone SDK

推荐答案

你可能也可以一起破解一个使用看起来像最小尺寸的进度条的图像,然后用它创建一个可伸缩的图像。

You could probably also hack one together using an image that looks like the progress bar at it's smallest size and then create a stretchable image with it.

UIImage *progressBarImg= [someImage stretchableImageWithLeftCapWidth:5.0 topCapHeight:0.0];

然后你可以将图像设置为禁用的UIButton的backgroundImage,并逐渐设置按钮宽度的动画以指示进展。我没有试过这个,但我认为它会起作用。

Then you could set the image as the backgroundImage for a disabled UIButton and animate the button width incrementally to indicate progress. I haven't tried this, but I think it would work.

这篇关于iPhone ProgressBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆