好的,我的iPhone应用程序中有一个屏幕,如下所示:
sample screen http://matthewcave.com/images/iPhone.jpg
当“添加注释”单元格被触摸时,我希望键盘消失,然后我希望它以模态方式显示“编辑注释”屏幕(它也有一个键盘,但我希望它在屏幕上重新显示动画)。
现在,它一次为所有的东西设置动画(键盘永远不会消失,它只是改变外观,新的视图在键盘下以模式设置动画)。整个效果可以正常工作,但有点不自然,我认为在屏幕上弹出模态视图之前,先把键盘滑下来会更平滑。我看到过其他应用程序做我想做的事情(例如事情),所以我知道这是可能的。
有人能给我指出正确的方向,让每个转换单独发生,而不是同时发生?
编辑:
根据要求,这是我正在使用的一些代码。不幸的是,它在目标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];