2013-03-18 41 views
0

在我的項目中,我用導航控制器移動到另一個,但我有一些視圖中有我的自定義導航控制器。從導航控制器到ModalViewController不工作並崩潰

請問我該怎麼辦?

我已經嘗試過這樣做,但正在發生我的崩潰。

[self.navigationController presentModalViewController:myVechileView animated:YES]; 

[self presentModalViewController:myVechileView animated:YES]; 
+0

你能更具體嗎?你如何定義模態視圖控制器? – 2013-03-18 04:54:21

+0

粘貼崩潰日誌? – 2013-03-18 04:58:10

+0

謝謝你們,我在拖拽文件時犯了錯誤,xib沒有加載到bundle資源中。我已經通過在Project >> Copy Bundle resource >>中解決了它,並在那裏添加了nib。 – Sawant 2013-03-18 05:13:16

回答

0
[self.navigationController presentViewController:myVechileView animated:YES completion:nil]; 
0

如果你是期運用iOS 6中,然後使用這個..

[self.navigationController presentViewController:myVechileView animated:YES completion:nil];' 

,如果你是在iOS 5懊悔不已那麼

[self.navigationController presentModalViewController:myVechileView animated:YES]; 

希望對你有所幫助