2015-03-03 134 views
0

我有一個UIView動畫框架全屏。它有一個UIImageView作爲子視圖,它的大小相同,它調整大小,但只在動畫結束時,它不能平滑地動畫它的圖像。 Views Autoresize子視圖已設置爲YES; 對此有何想法?UIView子視圖不動畫

[UIView animateWithDuration:0.3 
     delay:0 
     options:UIViewAnimationOptionAllowAnimatedContent   
     animations:^{ 
         _View1.frame = fullScreenRect; 
        } 
     completion:^(BOOL finished){;}]; 

回答

0

動畫他們都在塊:

[UIView animateWithDuration:0.3 
     delay:0 
     options:UIViewAnimationOptionAllowAnimatedContent   
     animations:^{ 
         _View1.frame = fullScreenRect; 
         subview1.frame = fullScreenRect; 
        } 
     completion:^(BOOL finished){;}]; 
1

[UIView的animateWithDuration:1.5F 延遲:0.0F 選項:0 動畫:^ { self.View.frame = CGRectMake( 10,50 +高度,寬度,高度); } 完成:^(BOOL finished){ }];

+0

這是什麼原因?爲什麼10,50+身高? – Md1079 2015-03-03 17:08:51

+0

不只是定位。忽略它。 – 2015-03-10 11:46:48

0

您必須設置_View1.clipsToBoud = YES;