Strange Transform of UIButton

I’m attempting to create an animation where it appears as if a UIButton is flipping horizontally

This SHOULD be the code

public func animateFLIP( _ newValue:Bool) {
if zFaceDown != newValue {
	UIView.animate(withDuration: speed_CARDFLIP , delay: 0.0, options: .curveLinear, animations: {
				self.transform = CGAffineTransform(scaleX: 0.01, y: 1);
	},completion: { _ in
		self.isFaceDown = newValue
		UIView.animate(withDuration: speed_CARDFLIP , delay: 0.0, options: .curveLinear, animations: {
					self.transform = CGAffineTransform(scaleX: 1, y: 1);
				})
			})
		}
	}

but the first transform makes the UIButton wider than the whole screen (when in fact it should go to 1% of its starting width
The 2nd transform is suppose to return it to normal… but in fact returns it to about 2x its original size

have you tried the seemingly silly transform set as

CGAffineTransform(scaleX: 100, y: 1);

JUST for shits & giggles as the code you posted seems right
but gives the opposite of what you’d expect
which is the only reason I’d suggest trying the opposite

docs definitely seem to say what youre doing should be right

actually what you suggested … seems to be true… but even so, the transform to 1,1 still comes out wrong…

Apple Docs… gotta love em! (well actually no, you don’t)

:man_shrugging:

i had to read the page a couple times to think oh maybe they are scaling from the left hand into the right which would explain why the .01 makes things larger

but given the math they claim it makes no sense

the new X, Y should be the old X Y multiplied by (.01 and 1)