我 viewDidload 我有如下设置:
[[self layer] setCornerRadius:30.0f];
NSString *imgFilepath = [[NSBundle mainBundle] pathForResource:@"imageName" ofType:@"jpeg"];
backImg = [[UIImage alloc] initWithContentsOfFile:imgFilepath];
然后在按下按钮时,我正在执行 transitionWithView:viewPressed ,例如:
[UIView transitionWithView:viewPressed duration:0.5
options:UIViewAnimationOptionTransitionFlipFromLeft
animations:^{
[self setImage:img];
[self setFrame:useFrame]; // Just a bigger frame
[((UIView*)self) bringSubviewToFront:viewPressed];
}
completion:NULL];
我有漂亮的圆角,但是当过渡开始时,它会在动画之前变成方角。
希望我解释清楚?
谢谢