Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:27:13+00:00 2026-06-05T02:27:13+00:00

From my TableView I dynamically want to show either a TableView or a DetailView

  • 0

From my TableView I dynamically want to show either a TableView or a DetailView (new segue), based on the cell’s content. I setup two segues from the TableView to different DetailViews and one segue from the TableViewCell to the TableView.

I have almost completed the implementation using performSegueWithIdentifier: (see below), but there is one struggling issue remaining: after I call [self dismissModalViewControllerAnimated:YES]; on the DetailView it returns to an empty TableView . I assume because the Storyboard segue from the UITableViewCell is performed. By clicking the back button I return to my original (parent) TableView data.

Any suggestions for this work?

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    NSLog(@"%s", __PRETTY_FUNCTION__);
    NSString *type = [[self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row] valueForKey:@"cell_type"];
    NSLog(@"cell_type: %@", type);
    if([[segue identifier] isEqualToString:@"DetailSegue"])
    {
        UIViewController *detailViewController = [segue destinationViewController];        
        detailViewController.game = [self.dataController objectInListAtIndex:[self.tableView indexPathForSelectedRow].row];
    } else if ...
    } else if([[segue identifier] isEqualToString:@"TableViewSegue"]){
    if([type isEqualToString:@"TableView"]){
    //Create child ViewController, a custom ViewController with custom initWithId:Title:
    CategoryViewController *categoryViewController = [[segue destinationViewController] initWithId:categoryId Title:categoryTitle];
    }
}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:27:14+00:00Added an answer on June 5, 2026 at 2:27 am

    I would create in my tableview multiple cells. Each with its own identifier. Then connect each cell to its own detailviewcontroller. You can also connect a cell to its own view controller (creating drill down functionality for only specific cell).

    Thats all…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to access my cell in the table from tableView:heightForRowAtIndexPath: since I want
The debugger threw me this error UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:
I'm loading a view from a tableview touched cell that contains a photo that
I was calling UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; from -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath in
In my app i can't delete row from tableview. The content of the tableview
Basically I want to recreate the filebrowser (drilldown Tableview) from the DropBox iPhone app
I'm having trouble loading a detailed view from a TableView. The segue doesn't fire
I am trying to load a new view from a tableview:didSelectRowAtIndexPath: method that happens
I have a string containing multiple values from a tableview cell,the string maybe multiple
showDescriptionPath is being passed from the previous Tableview. The text shows up, but the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.