所以我有兩個視圖A和B.A是一個配置文件視圖,B是一個登錄視圖。在登錄查看使用重新加載視圖iPhone
LoginViewController *lvc = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:[NSBundle mainBundle]]; //make new instance of LoginViewController
[self presentModalViewController:lvc animated:NO]; //present the LoginViewController
[lvc release];
在viewDidLoad方法一負荷B,如果登錄成功,認爲被刪除
[self dismissModalViewControllerAnimated:YES];
在登錄視圖,它下載了一些數據,我想顯示在配置文件視圖上。我將如何將數據發送到配置文件視圖並將其顯示在xib中。我相信配置文件視圖已經顯示,但只是隱藏。
即使它不起作用,因爲在登錄控制器之前首先調用配置文件視圖控制器。製作ProfileViewController * profileController會更容易;然後執行諸如profileController.username = username;但它不會顯示,因爲視圖已經繪製完成。 – mintuz
是啊真的......但是當你提出登錄頁面並解僱後它profileView的viewWillAppear將被稱爲..試試吧...... – Maulik