swiftui
Some of the examples below use a timer to control the loading screen. In real-life scenarios, you might need to use the number of bytes downloaded or uploaded or whatever value makes sense to you and works with your project.
下面的一些示例使用计时器来控制加载屏幕。 在现实生活中,您可能需要使用下载或上传的字节数或任何对您有意义的值,并可以与您的项目一起使用。
We will start with the basic activity indicator.
我们将从基本活动指标开始。
基本活动指标 (Basic Activity Indicator)
![Image for post](https://miro.medium.com/max/9999/1*bx5SUar7GujGT3szsv33Cg.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*yizhgivZftRazz3SdcFI6Q.gif)
微调器活动指示器 (Spinner Activity Indicator)
![Image for post](https://miro.medium.com/max/9999/1*OceJzmxKmINPjM_MphTKCQ.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*cKIKraD1IpSTSZaQzaxlbg.gif)
载入文字 (Loading Text)
![Image for post](https://miro.medium.com/max/9999/1*q6ZihcFgNBwgD2Nhg5RGfA.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*lDT6Le9FDZBGO1EIwyDgNw.gif)
加载栏 (Loading Bar)
![Image for post](https://miro.medium.com/max/9999/1*PEf7kIW6H_B8sfclBgmsrA.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*2d3MY7wbkTuzqwZeU3EgEA.gif)
半圆微调器 (Half-Circles Spinner)
![Image for post](https://miro.medium.com/max/9999/1*M_QQQtk3suClQ3Rn_fRFRg.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*lo_S9SBzk1j3KNG3LTWMDA.gif)
加载圈 (Loading Circle)
![Image for post](https://miro.medium.com/max/9999/1*NMSUfIrLPaN8Nwd5foFzpQ.png)
![Image for post](https://miro.medium.com/freeze/max/9999/1*LF06xYKvWKxYYTF4jgAuoA.gif)
Thanks for reading!
谢谢阅读!
翻译自: https://medium.com/better-programming/activity-indicators-in-swiftui-17b66e6c0137
swiftui