Комментарии:
شكراً لك, أضفته إلى مشروعي بنجاح وبسهولة! هذا المحتوى جيد
ОтветитьReally useful content. Thanks to this great video I added activity indicator into my project successfully. Thank you!
ОтветитьThough old, yet helpful!
Ответитьthanks
ОтветитьMine doesn't stop
ОтветитьGreat video. I have a question. When we remove view from super view but doesn't stop activity indicator. So will it stop or not?. Or will it effect on memory usage.
ОтветитьThank you, very clean solution, I was wondering how to apply this in navigation controller to overlay the nav bar too
ОтветитьThank you, that is a great video. Is this aView act like a container View? And I'd like to put that aView property inside the extension closure, but it seems Apple not allow it.
ОтветитьThank you, that is a great video. Is this aView act like a container View? And I'd like to put that aView property inside the extension closure, but it seems Apple not allow it.
Ответитьthank sir
ОтветитьNice and easy decision! Thank you! Well explanation!
Ответитьty so much
ОтветитьGENIUS!!! THANK YOU , really helpful
if view controller have navigation bar , aView not appear above navigation bar , what problem ??
you have one more subscriber, thank you for the tip :D
ОтветитьHi, thank you very much for this tutorial. Alas, it won't show. I have multiple viewControllers, where the data gets loaded from the database during segue preparation, so I wanted to have an indicator there. Therefore, I have put as follows:
self.showSpinner()
self.performSegue(...)
self.removeSpinner()
the code gets executed (I checked it with a print statement), yet there is no sign of the spinner or the view with a darker background. Do you have any idea what could be wrong?
GENIUS!!! THANK YOU!!
ОтветитьThanks - really helpful. Quick question: I tried something similar using a private activity indicator, instead of a private view, e.g.: private var activityIndicator = UIActivityIndicatorView(). I added the indicator to the subview: onView.addSubview(activityIndicator), centered the activity indicator based on the onPoint view passed in, and instead of removing the view + setting it to nil, I just did: activityIndicator.stopAnimating(). I suspect I'm overlooking something (retain cycle) that prompted you to use the view and add the activityIndicator to the view, instead of the activityIndicator directly. My code works, but am wondering if I've forgotten something important. Thanks again for sharing knowledge in a very useful tutorial!
Ответитьthis is what I'm looking for, Thanks you saved my day
Ответитьthis works also
func showLoading() {
guard let activityLoading = view.viewWithTag(1234) as? UIActivityIndicatorView else {
// create activity loading for first time
let activityLoading = UIActivityIndicatorView(style: .gray)
activityLoading.tag = 1234
view.addSubview(activityLoading)
activityLoading.startAnimating()
activityLoading.snp.makeConstraints { make in
make.center.equalTo(view)
}
return
}
if activityLoading.isAnimating == false {
activityLoading.startAnimating()
}
}
func dismissLoading() {
guard let activityLoading = view.viewWithTag(1234) as? UIActivityIndicatorView else { return }
if activityLoading.isAnimating == true {
activityLoading.stopAnimating()
}
}
this is a great presentation on handling the spin activity indicator. well presented.
Ответитьthanks
Ответить