2010-08-05 31 views

回答

7

如果你的目標的iOS4(從UIView的文檔的代碼片段):

[UIView animateWithDuration:0.2 
       animations:^{ table.alpha = 0.0; } 
       completion:^(BOOL finished){ [table removeFromSuperview]; }]; 
0

1)插入新的子視圖0(索引所以它的隱藏)到視圖堆棧上。

[window insertSubview:myNewView atIndex:0]; 

2)然後製作動畫直接從文檔視圖了()爲:

[UIView animateWithDuration:0.2 
     animations:^{ view.alpha = 0.0; } 
     completion:^(BOOL finished){ [view removeFromSuperview]; }]