I am trying to write a global function that adds an ActivityIndicator to any view (mainly ImageViews) by calling such a function.
Now I have a function:
public func addActivityIndicatorToView(activityIndicator: UIActivityIndicatorView, view: UIView){
But for some reason I do not get the center of the eye.
I also tried various solutions around SO and Google, but so far no one has worked.
Is there a way to get the center point and set the ActivityIndicator for any UIView?
center swift uiview
Phillip
source share