嘿,只是想知道如何/如果可能讓UITableView從上到下進行動畫製作。 執行轉換的標準方法將頁面底部設爲頂部,bu我在頁面上有一個撤消按鈕,我想讓用戶點擊,如果他們決定返回...這是我的代碼對於目前的動畫從頭到尾..如果你可以幫助我改變它,那將是非常棒的。如何從上到下創建UINavigationController動畫
- (void)viewDidLoad {
//Title
self.title = @"Advanced Search";
[super viewDidLoad];
//undo button takes you back to main search options
UIBarButtonItem *undoButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemUndo target:self action:@selector(undoButton:)];
self.navigationItem.leftBarButtonItem = undoButton;
}
- (void)undoButton:sender {
RootViewController *rootViewController = [[RootViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
[[self navigationController] presentModalViewController:navigationController animated:YES];
[navigationController release];
}
我實際上使用的是你的鏈接問題的代碼:) [self.navigationController dismissModalViewControllerAnimated:YES]; 我剛剛取代了我的undoButton方法和BOYA中的第三行!制定出了不錯的:) – tinhead 2011-05-04 20:28:34
只是爲了勾畫dismissModalViewControllerAnimated:YES是從頂部到底部爲視圖製作動畫。 – tinhead 2011-05-04 20:43:26
@tinhead我沒有意識到你想擺脫屏幕視圖 - 我以爲你真的想改變標準的模態視圖動畫。對於困惑抱歉! – magma 2011-05-05 13:41:46