Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is self.navigationController = nil from a method
    primarykey
    data
    text
    <p>For some unknown reason I cannot push a view, I will try to explain the best I can but i have alot of complicated views going on, And it would be a nightmare to explain but say I have the following method.</p> <pre><code> -(void)showDetailView{ DetailViewController *detailView = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil]; [self.navigationController pushViewController:detailView animated:YES]; [detailView release]; } </code></pre> <p>Which works and would push the detail view onto the stack, this is on my main view and my main thread. </p> <p>So in the table view i have a cell with a Subview that then takes its view from another view controller. In that view controller I have more subviews, and say when a user clicks a subview a method is called. Which in turn will call this method on the mainView. </p> <p>So one would believe that then a new view should get pushed. And the code runs, no errors occur but the view is not changed/switched.</p> <p>I have tried various method of pushing a view inside the view controller that is it called from. and then just calling a method which is directly connected to the navigation controller to push the views.</p> <p>A few things to add. 1. I have a IBAaction button that pushes a view (that works fine) 2. I assume its because im through so many views but I'm assuming that if you call push view controller it will push whatever view you pass it. 3. I have checked when the method is called from the main view self.navigationcontroller does not = null. </p> <p>But if the navigation controller is called through the method call it = null. </p> <p>So is there anyway to restore the null value of a navigation controller?</p> <p>Im a little confused on why i cant simply call a method to push a view </p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload