我想旋轉按鈕,形狀爲一個正方形(65 x 65)。旋轉它們後,按鈕會改變它們的大小。有什麼辦法,做一個輪換和保持大小?旋轉UIButton並保留其大小
代碼:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
self.stealthButton.transform = CGAffineTransformMakeRotation(radians);
self.recButton.transform = CGAffineTransformMakeRotation(radians);
self.toggleButton.transform = CGAffineTransformMakeRotation(radians);
[UIView commitAnimations];
是否要在轉換後將它們調整到原始大小?因爲它必須縮放以適合原始尺寸 – Ossir