-
12-11-2014, 04:22 PM #1Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
PopviewController quay về viewController trước đó
Mình có 1 SessionListViewController khi minh nhấn button Send Email trong SessionListViewController thì nó sẽ hiện lên SendEmailViewController
trên SendEmailViewController ta có button Send khi click vao button Send ta sẽ cho xuất hiện navigationController SendEmailPopupViewController như sau : code như sau
SendEmailPopupViewController *sessionListController = (SendEmailPopupViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"SendEmai lPopupViewController"];
CustomNavigationController *navigationController =[[CustomNavigationController alloc]initWithRootViewController:sessionListController];
navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:navigationController animated:YES completion:nil];
trên SendEmailPopupViewController ta có button X khi nhân vào thì sẽ quay về SessionListViewController , tôi đã dùng dismissview nhưng nó chỉ quay về SendEmailViewController chứ chưa quay về SessionListViewController
Khi cố gắn dùng popview
SessionListViewController *settingsVC = [self.storyboard instantiateViewControllerWithIdentifier:@"Identifi erBackEmail"];
[self.navigationController popToViewController:settingsVC animated:YES];
[self.navigationController popViewControllerAnimated:YES];
thì nó error là tried to pop to a view controller that doesn't exist.
Mong mọi người giúp đỡ.View more random threads:
- Làm sao tăng kết nối multipeer connectivity framework ?
- download link video từ 1 trang web bất kỳ
- Lỗi Thread 1: Signal SIGABRT
- Load lại ảnh và text trên UITableviewcontroller ???
- Cố định cho Lanscapes cho màn hình
- Làm sao cập nhập được thay đổi từ webservice trong UITableView
- Lấy khoảng cách từ (camera)iphone xuống mặt đất, sử dụng GPS và CLLocationManager.
- Code trong objective c có chạy được trong c++ không
- Cách thay đổi kích thước của UIview???
- Cơ chế truyền delegate trong Objective C như thế nào ???
-
14-01-2015, 04:28 PM #2Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Do bạn present SendEmailPopupViewController nên không thể dismiss theo kiểu đó được, mà present thì nó làm gì có navigation mà pop nữa
Mình nghĩ có 2 cách thế này
1- Bạn dismiss SendEmailPopupViewController khi dismiss xong thì pop về SessionListViewController
2- Bạn đừng present mà push hết đi, như vậy mình có thểMã:popToViewController:settingsVC
p/s : code bạn nên để trong thẻ CODE để mọi người dễ đọc
Vệ sinh cá nhân là một phần quan yếu của sức khỏe nam giới. Dùng dung dịch vệ sinh mỗi ngày mang lại nhiều ích, giúp loại bỏ vi khuẩn và vi sinh vật gây hại, giúp khu vực cơ quan sinh dục luôn sạch...
Gel vệ sinh cu, bạn trai có nên...