iOS无状态/无价值进度栏? [英] iOS Stateless/Valueless Progress Bar?

查看:104
本文介绍了iOS无状态/无价值进度栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在iOS中获得无状态/无值的UIProgressView或其他类型的进度条:

I'm looking to get a stateless/valueless UIProgressView or other kind of progress bar in iOS:

我尝试查找一些文档,但找不到与我相关的任何内容问题。

如果您有任何建议,我想听听他们的建议:)

I've tried looking up some documentation but couldn't find anything relevant to my issue.
If any of you have any recommendations i'd love to hear those :)

谢谢!

Shai。

Thanks!
Shai.

推荐答案

iOS的 UIProgressView 是专门为这种情况而设计的,在这种情况下您可以确定地知道任务的完成百分比。它仅提供填充样式的演示文稿。您将不能仅将其用于指示正​​在进行的活动。

iOS's UIProgressView is designed specifically for that situation in which you know with certainty the percentage completed of your task. It only provides a 'fill-in' style presentation. You will not be able to use it for merely indicating an ongoing activity.

想法:使用 UIImageView 的能力来通过数组图片。您可以在我称为理发店杆进度图像上创建几个(三个或四个)变体,然后使用它们。或者...只是将您发布的动画gif放在UIImageView中。它将正常工作。如果您想停止对其进行动画处理,...

Ideas: use UIImageView's capacity for animating through an array of images. You could create just a few (three or four) variants on what I will call the 'barbershop pole' progress image and use those. Or... just take that animated gif you posted and put it in your UIImageView. It will work fine. If you want to stop animating it... just do something like

[myImageView setImage:stoppedImage];

如果您真的想花哨的话,可以编写一些子类来完成您想要的所有事情。但是谁有时间?保持简单!

If you really want to get fancy, you could write some subclass to do everything you want. But who has the time? Keep it simple!

另一个想法

Another thought

我为什么不建议您在图像视图中使用上面发布的动画gif?它将起作用。并且相当容易。

Why didn't I just suggest that you use the animated gif you posted above in your image view? It will work. And be rather easy.

这篇关于iOS无状态/无价值进度栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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