I may be misunderstanding how the CGAffineTransform works but it seems to be giving strange results for the origin of the frame.
for example :
print(attribute.frame)
attribute.transform = CGAffineTransform(scaleX: 0.68, y: 0.68)
print(attribute.frame)
gives the results :
(213.0, 54.0, 459.0, 23.5)
(286.29948979591836, 57.75280612244898, 312.4010204081633, 15.994387755102032)
The width and height scale correctly but the x and y origin have increased in value.