tôi đã nhìn đăng nhập được trình bày như một MVC và tôi có một cái nhìn đăng ký trình bày như một NavigationControlloer trên đầu trang của nó:Ẩn tất cả các bộ điều khiển xem phương thức
Đăng nhập (MVC) ----> Đăng ký (NavigationController)
tôi đang trình bày quan điểm đăng ký (createAccount) tại Loginview như sau:
createAccount= [[CreateAccount alloc] initWithNibName:@"CreateAccount" bundle:nil];
navController = [[UINavigationController alloc] initWithRootViewController:createAccount];
UIBarButtonItem *cancelButtun=[[UIBarButtonItem alloc]initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(HideMe)];
UIBarButtonItem *registerButtun=[[UIBarButtonItem alloc]initWithTitle:@"Register" style:UIBarButtonItemStyleBordered target:self action:@selector(Register)];
createAccount.navigationItem.leftBarButtonItem = cancelButtun;
createAccount.navigationItem.rightBarButtonItem=registerButtun;
[email protected]"Create Account";
[self presentModalViewController:navController animated:YES];
bộ điều khiển đăng nhập có NSURLConnectionDelegate cho gian hàng đăng nhập và đăng ký. khi đăng ký kết thúc, tôi chỉ cần gọi số
[self dismissModalViewControllerAnimated:YES];
sẽ chỉ loại bỏ chế độ xem đăng ký.
tôi cũng muốn loại bỏ chế độ xem đăng nhập để tôi có thể quay lại ứng dụng chính của mình.
Xin làm rõ làm thế nào bạn đang trình bày quan điểm đăng ký. Có một chế độ xem phương thức khác không? –
Tôi đã chỉnh sửa bài đăng :) – Kassem