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

  • SEARCH
  • Home
  • 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 8101045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:53:21+00:00 2026-06-05T22:53:21+00:00

I have made a view in the application that shows a UITableView. It will

  • 0

I have made a view in the application that shows a UITableView. It will be full of results (obviously) almost all the time, however when it does not have any results I want to show another view that inform the user about how he/she could populate the table.

I want to design that view in the interfacebuilder. I will have to check in the code whether the datasource is empty or not to toggle between the two different nibs. How do I instantiate and configure a view made in Interfacebuilder?

  • 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-05T22:53:23+00:00Added an answer on June 5, 2026 at 10:53 pm

    The easies way to do this is by adding the view in xib normally and make it visible
    Design your both views, the table view and the other view, give the tableView a tag of 111 for example and give the otherview another tag 222 for example

    Now in viewDidLoad

    Get both the views

    UIView *noDataView = [self.view viewWithTag:222];
    UITableView *tableView = [self.view viewWithTag:111];
    //Hide both of them or only the noDataView until you know if you have data from the dataSource or not
    

    Check for your data source

    //hasElements do you have any element to show?
    if(hasElements)
    {
        noDatView.hidden = YES;
        tableView.hidden = NO;
    }
    else
    {
        noDatView.hidden = NO;
        tableView.hidden = YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom-made view that extends the View class. I would like 2
Assume I have several Views in my WPF application that all show a report,
I have made a list view containing two childs. Now i am trying to
I have made an application (for my self) for feeds reading, using SyndicationFeed ,
I have a PartialViewModel in my MVC application that contains the following set up:
Greetings, I have an asp.net mvc application. I have some links that corresponds to
UPDATED (12/17/2009): Now reflects latest progress I've made. This is the first application that
I have created MobClix account, made sure I have filled up all kinds of
I have an application made by a UITabBar with three tabs. One of these
i have made an android application and in it , there is one scenario

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.