I am trying to create a circle and spin it about its center (see my question about drawing this)
So in my ViewController I have a func that creates the wheel inside a UIView I have drawn, myWheel, which is put in the center of the View using constraints. This is called in viweDidLoad()
Inside that func I do a print of some values to check
myWheel.center (270,270)
myWheel.frame (0,0,540,540)
myWheel.bounds (0,0,540,540)
originally I was trying to use the .center value to draw the wheel at the center of myWheel view, but when I press my button which calls the function to spin the wheel around its center it gives different values. In the function attached to my @IBAction which adds the rotation:
myWheel.center (161.5,161.5)
myWheel.frame (8,8,307,307)
myWheel.bounds (0,0,307,307)
I suspect the values during creation are before the screen size is known - but can't find any doco which talks about this. The issue is how do I determine during creation the center point which I need to draw my circle?