ios 创建自定义 UIActivityIndi​​catorView

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6010237/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:55:53  来源:igfitidea点击:

Creating a custom UIActivityIndicatorView

iphoneobjective-ccocoa-touchiosuiactivityindicatorview

提问by Abhinav

I want to have a custom view for UIActivityIndicatorViewrather than relying on options given by iOS. How can I create my own view here?

我想要一个自定义视图,UIActivityIndicatorView而不是依赖于 iOS 提供的选项。如何在此处创建自己的视图?

I have a list of images with me to create a animated view.

我有一个图像列表来创建动画视图。

采纳答案by Jhaliya

As you haven't specified the case in which you want to use the activity indicator,

由于您尚未指定要使用活动指示器的情况,

check the below tutorial blog for custom UIActivityIndicatorView,

检查下面的教程博客自定义UIActivityIndicatorView

Custom UIActivityIndicatorView (EDIT: This link is gone)

自定义 UIActivityIndi​​catorView(编辑:此链接已消失)

Showing a "Loading..." message over the iPhone keyboard

在 iPhone 键盘上显示“正在加载...”消息

回答by Or Ron

This is implementation of custom UIActivityIndicatorfrom scratch ready for integrating.

这是从头开始准备集成的自定义 UIActivityIndi​​cator的实现。

回答by Deepak Danduprolu

Abhinav, if you want to use a set of images you could as well use a UIImageView. Set the animationImagesand start-stop as you wish.

Abhinav,如果你想使用一组图像,你也可以使用UIImageView. 根据需要设置animationImages和启停。

回答by RandomGuy

Thisone looks nice and clean, can be hooked to the code easily too.

这个看起来漂亮干净,也可以很容易地与代码挂钩。