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 6664683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:38:18+00:00 2026-05-26T02:38:18+00:00

I have a tableView. In each cell i display the following characters A ,

  • 0

I have a tableView.

In each cell i display the following characters A, B, C etc..

When a user clicks on A i need the page to go to the other view that shows another tableView that prints the following text America,
Australia. (This part has been done)

When the user clicks B, The view goes to the other page, but since there are no countries stating with the character B it shows an
empty table.

When the user clicks on C countries Canada and China gets displayed.

What i want to do is, When the user clicked on B and since there aren’t any countries, i don’t want the page to get re-directed to-
another page that shows an empty table.

How should i solve this ?

**** All the Country names are loaded from sqlite

I have added the code as follows, so this is why all my screen get directed to the other view (and B showing an empty tableView)

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {


     Countries *viewControllerCountries = [[Countries alloc] initWithNibName:@"Countries" bundle:nil];

    [self.navigationController pushViewController:viewControllerCountries animated:YES];

    [viewController release];

}
  • 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-05-26T02:38:18+00:00Added an answer on May 26, 2026 at 2:38 am

    Make a method in your Countries class to allow your parent view controller retrieves the record counts. If the count is 0 then don’t push the view.

    P.S. I think something like CountriesViewController is less confusing than Countries.

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

Sidebar

Related Questions

On each cell of my table view I want to have a bar that
I have a tableview that occupies only the bottom third of my view. I
I have around 20 tableview cells that each contain a number (2-5) thumbnail sized
I have a table view where I want a different image for each cell
I have tableview with some names on each cell , how can i get
I have a UIViewController subclass that loads a bunch of images for each cell
I have a tableview with each cell loaded from a xib. It is in
I have a table view with bible verses on each cell. I want to
I have a tableView:didSelectRowAtIndexPath: where I create a ViewController-Instance each time an item is
I have an app which contains a scrollview with several tableviews. Each tableview is

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.