I am trying to use a Swift function to place a circle in the centre of a view so it is always on centre regardless of screen size. I can draw the circle at a point defined by a
In your ViewDidLoad method, you are only calling the method, but not storing the returned values. All you need to do to fix this is to create a variable and assign it to the call of your function.
Example:
let center = screenCentre()
print(center)
Now, the variable center will contain the coordinates of your screen's center. And in subsequent code, you can use center like you would with any other variable.