iPhone ProgressBar

前端 未结 3 1910
旧巷少年郎
旧巷少年郎 2021-02-03 16:19

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

3条回答
  •  执念已碎
    2021-02-03 16:59

    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];
    

    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.

提交回复
热议问题