2
我有一個簡單的UIView:使用cgaffinetransformmakescale和cgaffinetransformmakerotation變形我看來
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
view.backgroundColor = [UIColor greenColor];
[self.view addSubview:view];
self.someView = view;
然後我做這個
[UIView animateWithDuration:10
delay:1
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
self.someView.center = CGPointMake(CGRectGetWidth(self.view.bounds) - CGRectGetWidth(self.someView.frame)/2, 150);
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI);
self.someView.transform = CGAffineTransformScale(transform, 2, 0.5);
}
completion:^(BOOL finished) {
}];
當執行這個簡單的動畫,變形。據我所知它應該旋轉並改變它的大小。我不明白爲什麼會發生這種情況,我該如何解決它?
謝謝