Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

uistatusbar - Loading Indicator in Status Bar iOS

I'm trying to figure out what the loading circle animation in the status bar is. A lot of apps, when they load data, have a spinner in the status bar to indicate that the app is loading data, but I can't figure out what its called to implement it. Can someone tell me what it is called?

If you don't know what I'm talking about, but have an iOS device, try loading a web page in Safari and look at the spinner in the status bar. Thats what I'm talking about.

Here is an screenshot I took Its the spinner in the statusbar.

question from:https://stackoverflow.com/questions/11068143/loading-indicator-in-status-bar-ios

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think what you are looking for is:

[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

Swift 3

UIApplication.shared.isNetworkActivityIndicatorVisible = true

as doc'd here: https://developer.apple.com/documentation/uikit/uiapplication/1623102-isnetworkactivityindicatorvisibl


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...