OK,我有一個畫面在我的iPhone應用程序,如下所示: sample screen http://matthewcave.com/images/iPhone.jpg試圖訂購內置UIAnimations,沒有多少成功
當筆錄細胞被觸摸時,我想的鍵盤消失,那麼我希望它以模態方式顯示編輯筆記屏幕(它也有一個鍵盤,但我希望它在屏幕上回放)。
現在它可以一次完成所有動畫(鍵盤永不消失,它只是改變它的外觀,並且新的視圖模擬地動畫,看起來在鍵盤下面)。整個效果功能正常,但它有點生氣,我認爲在彈出屏幕上的模式視圖之前滑動鍵盤會更平滑。我已經看到其他應用程序做我想做的事情(例如,事情),所以我知道這是可能的。
任何人都可以指出我在正確的方向使每個過渡單獨發生,而不是一次全部發生?
編輯:根據要求,這裏是我使用的一些代碼。不幸的是,它在Objective C中與在英語中幾乎完全相同。
UITableViewController* tableViewController = (UITableViewController*)tableView.dataSource;
AddNotesViewController* addNotesViewController = [[AddNotesViewController alloc] initWithWine:[self myWine]];
UINavigationController* addNotesNavController = [[[UINavigationController alloc] initWithRootViewController:addNotesViewController] autorelease];
// tell the name override cell to resign if they need to
[(NewWineViewController*)tableView.dataSource resignNameCell];
//I'd like the animation caused by the resign to complete before proceeding.
[tableViewController.navigationController presentModalViewController:addNotesNavController animated:YES];
你可以發佈你現在有的代碼片段嗎? – 2009-08-03 05:18:38