1

我新來stackoverflow,這是我的第一個問題。 我的問題是:我有一個UINavigationController,並有一個UITableView裏面。我將參數傳遞給另一個視圖時,在tableview中使用didSelectRowAtIndexPath方法單擊一個單元格,並在另一個視圖中顯示單元格信息,我稱其爲SecondViewController。在SecondViewController裏面我有另一個標籤,我想將它的值傳遞給選中的單元格的子值。作爲一個結論,我想將一個值傳遞給navigationcontroller的主視圖。iPhone UINavigationController傳遞參數返回主視圖

感謝您收到的所有回覆。 Regards, ae

回答

0

在你的secondviewcontroller中,被調用彈出到主控制器的方法,在該方法內傳遞值給mainview屬性。
例如,

觀點一:--- MAINVIEW
第二個視圖:secondcontroler

現在裏面secondcontroller: - - (無效)getbacktomainview
{
MAINVIEW * MN; mn.someproperty = yourvalue;
[navigationController popViewControllerAnimated:YES];
}

希望它可以幫助你.....

+0

TY的答案,我會嘗試一下 – aeciftci 2011-05-08 11:25:04