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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:21:04+00:00 2026-05-20T22:21:04+00:00

I have a common header and common footer in all the view controllers of

  • 0

I have a common header and common footer in all the view controllers of an iPhone application.
What I want to do is, I want to separate the header and footer into different nib, .h and .m files and want to integrate these into one view.

How to do that?

Thanks all.
Guru

  • 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-20T22:21:05+00:00Added an answer on May 20, 2026 at 10:21 pm

    You can create 2 UIViewController(s):

    • HeaderViewController.m (with .h and .xib)
    • FooterViewController.m (with .h and .xib)

    Then in you view you add them by code: (Or via Interface Builder if you want)

    HeaderViewController *header = [[HeaderViewController alloc] init];
    [header setFrame:CGRectMake(0,0, 320, 100)]; // For example
    [self.view addSubview:header.view];
    

    In IB: Add a new UIViewController in IB, change the classe UIVIewController by HeaderViewController, link it with an IBOutlet (header), then you just have to do [self.view addSubview:header.view];.

    enter image description here

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

Sidebar

Related Questions

In my CodeIgniter application have a common header and footer view, which I include
I have an application with a common Header in all layouts. I want that
We are using Eclipse+CDT+SVN(Linux). How can we have some common header files in a
I have a header file, lets say Common.h, that is included in all of
We have several common libs. Ideally we want them all to use the latest
I have a site where all the pages have the same header and footer,
I have a header common in all activities. header.xml <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a common HTML header file which I use in several PHP files.
I have a large number of pages, each of which use a common header/footer.
I have a middle size of website that share a common header/footer and almost

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.