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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:26:46+00:00 2026-06-14T03:26:46+00:00

I am developing an iPad application. For some reasons, I need to show a

  • 0

I am developing an iPad application. For some reasons, I need to show a two tableviews in the same view controller. I have created a UIView in a xib and connected a outlet to that view controller. I need to show that view in those two tableviews as a tableHeaderView. When I try to assign that view to both header views, it is showing only in the second tableview.I hope there is a single instance for that view. So it is showing on only in the view, which I assigned last. How could I overcome this?? Any help would be appreciated.

Here it is my code.

[energyTableView setTableHeaderView:tableHeader];
[maintenanceTableView setTableHeaderView:tableHeader];

@CodeBySteveZ

As he said, I created an xib and tried. And still I can’t get the solution. Am I doing anything wrong??here it is how I tried.

NSArray *topLevelObjects = [[NSBundle mainBundle]loadNibNamed:@"tableHeaderCell" owner:nil options:nil];

[energyTableView setTableHeaderView:[topLevelObjects objectAtIndex:0]];
[maintenanceTableView setTableHeaderView:[topLevelObjects objectAtIndex:0]];

I think this is also a same thing as I did before.

  • 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-14T03:26:47+00:00Added an answer on June 14, 2026 at 3:26 am

    You’ll have to create another instance of the tableHeader. A UIView can only live in one visual sub-tree at a time. Using IB you could copy the element and create 2 instances of it. Or if you create a separate xib with that just element you could load that particular xib twice via code, once for each table header.

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

Sidebar

Related Questions

I am developing an iPad application in which I need a table view (
I am developing a view based iPad application.It is a simple view based application
I'm developing an iPad application. I have been provided with a PNG image that
I am developing an iPad application. I have an SQLite database in my resource
I am developing an iPad application with view-based template in landscape mode as it
I'm developing an iPad application for a company. Because of confidentiality reasons they do
I am developing an iPad application in which I have saved images to custom
I'm currently developing an iPad application that integrates MapKit. But I have a small
In an iPad application I'm developing, I want to show a UITableView that does
I am developing iPad Application and did all orientations. But some times the application

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.