的頂部的參考視圖我在一些UIViewControlle,需要返回到前一個,我用這個代碼:如何獲得在NavigationController
NSLog(@"%@", [self.navigationController popViewControllerAnimated:YES]);
// Here I need to reference to the view I am going go to to call some function before this view is being displayed
NSLog(@"Done button pressed");
但(寫在我需要獲得對執行彈出功能後顯示的視圖的引用(上一個viewController。
兩者的回報'(空)'如果叫'popViewController前後獲得參考對象'功能! –
如果您在調用poViewController _method_之前調用它,該怎麼辦? – Geoffroy
它返回當前視圖控制器,但我需要一個ref到前面的viewController –