我在我的iPhone應用程序,這樣的一些代碼:爲什麼新的UIImageView無法動畫?
//fromView is a UIImageView.
//self is a UIView.
UIGraphicsBeginImageContext(fromView.bounds.size);
[fromView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *dummyFromImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageView* dummyImageView = [[UIImageView alloc] initWithImage:dummyFromImage];
[self addSubview:dummyImageView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView: dummyImageView cache:YES]; //line:9
[UIView commitAnimations];
的dummyImageView只能說明,但從來沒有翻轉,如果你改變line9的dummyImageView到fromView,fromView做翻轉,請告訴我爲什麼?