Animation Can';t设置子视图动画';s框架

Animation Can';t设置子视图动画';s框架,animation,uiimageview,frame,subview,Animation,Uiimageview,Frame,Subview,我正在尝试设置子视图帧的动画,但它不起作用: [UIView animateWithDuration:0.5 animations:^{ NSLog(@"BIIIM %@", [_subView subviews]); UIImageView *imageView1 = (UIImageView *)[self.view viewWithTag:(1)];{

我正在尝试设置子视图帧的动画,但它不起作用:

[UIView animateWithDuration:0.5
                   animations:^{
                   NSLog(@"BIIIM %@", [_subView subviews]);
                   UIImageView *imageView1 = (UIImageView *)[self.view viewWithTag:(1)];{
                             imageView1.frame = CGRectMake(76.8 , -100, 33.4, 164);
                             imageView1.alpha = 0.5;   
                                                              }
alpha的动画工作正常,但帧的动画不正常。。。有什么想法吗?
谢谢

我做了一个简单的测试,如下所示,结果发现效果很好。alpha和帧都会更改

- (void)viewDidLoad
{
    [super viewDidLoad];

    UIImageView *imageView1  = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
    imageView1.backgroundColor = [UIColor redColor];
    [self.view addSubview:imageView1];

    [UIView animateWithDuration:2 animations:^{
        imageView1.frame = CGRectMake(20, 20, 100, 100);
        imageView1.alpha = 0.5;
    }];

}

谢谢你的回答。问题不在于动画,因为即使我尝试在没有动画的情况下更改imageView1的帧,它也无法工作。。。但是阿尔法有效(嗨,我做了一个简单的测试,如下所示,发现它工作正常。alpha和frame都发生了变化。-(void)viewDidLoad{[super viewDidLoad];UIImageView*imageView1=[UIImageView alloc]initWithFrame:CGRectMake(0,0,30,30)];imageView1.backgroundColor=[UIColor redColor];[self.view addSubview:imageView1];[UIView animateWithDuration:2个动画:^{imageView1.frame=CGRectMake(20,20,100,100);imageView1.alpha=0.5;};};}非常感谢流觞_iviedsky!我想问题更多的是我的superview不允许我的子视图移动或类似的东西。我不明白为什么。