Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS - pushViewController pushes to a nil view controller
    primarykey
    data
    text
    <p>I am trying to make a UITableViewCell upon select lead to another viewController while carrying data to it. However, it just ends up pushing to a nil view controller</p> <p>In Main.storyboard, I have created the view controller and have given it the class "DetailedTweetViewController"</p> <p><a href="http://postimg.org/image/hf7wg0ilp/" rel="nofollow">http://postimg.org/image/hf7wg0ilp/</a> - image showing the classes and identifier</p> <p><a href="http://postimg.org/image/f0w0ezjzv/" rel="nofollow">http://postimg.org/image/f0w0ezjzv/</a> - image showing no segues</p> <p>Everything seems to be hooked up fine and all, this is my code: </p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSDictionary *currentTweet = _userPosts[indexPath.row]; DetailedTweetViewController *tweetDetailedViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailedTweetStoryboard"]; tweetDetailedViewController.statusID = currentTweet[@"id"]; [self.navigationController pushViewController:tweetDetailedViewController animated:YES]; } </code></pre> <p>I have no clue why it's not working...</p> <p>This is an image of the error: <a href="http://postimg.org/image/cjb595s8j/" rel="nofollow">http://postimg.org/image/cjb595s8j/</a></p> <h1>UPDATE</h1> <p>I tried pushing directly to the view controller without passing data:</p> <pre><code>DetailedTweetViewController *detailedViewController = [[DetailedTweetViewController alloc]init]; [self.navigationController pushViewController:detailedViewController animated:YES]; </code></pre> <p>But i didn't get any error just a blank screen: <a href="http://postimg.org/image/7i02wst9v/" rel="nofollow">http://postimg.org/image/7i02wst9v/</a></p> <h1>UPDATE</h1> <p>Initialized the current view controller that has <code>didSelectRowAtIndexPath</code> in another viewController called <code>viewController</code></p> <p>this is the code:</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; FeedViewController *feedViewController = [[FeedViewController alloc]init]; feedViewController.currentUserAccount = [_twitterAccounts objectAtIndex:indexPath.row]; feedViewController.navigationItem.hidesBackButton = YES; [self.navigationController pushViewController:feedViewController animated:YES]; } </code></pre>
    singulars
    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.
 

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