2009-09-17 32 views
9

Tôi hiện đang có một TableView bên trong một NavigationController nơi khi một mục được chọn đoạn mã sau là ran:Mô phỏng nút back trên UINavigationController trên iPhone

DetailViewController *DetailViewController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:[NSBundle mainBundle]]; 

[self.navigationController pushViewController:DetailViewController animated:YES]; 
[DetailViewController release]; 
DetailViewController = nil; 

này tải lên xem chi tiết của tôi, tuy nhiên câu hỏi của tôi đây có phải là ... Làm sao tôi có thể gọi backbutton trên bộ điều khiển điều hướng mà không cần nhấn nó? Hoặc làm thế nào có thể thiết lập nó trở lại xem bảng (đó là những gì backbutton không)?

Nhờ sự giúp đỡ :)

Trả lời

36

Bạn có thể gọi phương thức popViewController:

[self.navigationController popViewControllerAnimated:YES]; 
+1

đánh vào đít thủy tùng, chỉ là những gì tôi đã sau :) –

Các vấn đề liên quan