I have an UIActivityIndicatorView in the tableview cell.
To display the uploading status.
It works great on my app.
But it never spinning in the share app extension.
class MyCell: UITableViewCell {
@IBOutlet private var activityIndicator: UIActivityIndicatorView!
func config(isUploading: Bool) {
isUploading ? self.activityIndicator.startAnimating(): self.activityIndicator.stopAnimating()
print("isUploading: \(isUploading), isMainThread: \(Thread.isMainThread)")
// isUploading : true, isMainThread: true
}
}
I tried to run this in the dispatch main queue. not work
DispatchQueue.main.async {}
DispatchQueue.main.asyncAfter(deadline: , execute: )
I also tried to add an separate UIActivityIndicatorView in the XIB.
The only work of this new UIActivityIndicatorView is spinning.
It shows on the screen but not spinning.
Seems UIActivityIndicatorView won't spinning in the share app extension.
It is weird