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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:25:21+00:00 2026-05-26T21:25:21+00:00

I am just starting in my iOS development using xCode 4.2 and discovered storyboards.

  • 0

I am just starting in my iOS development using xCode 4.2 and discovered storyboards. They seem great for rapid prototyping.

What I’m wondering is how can I create my own custom control that I can use in multiple views.

For example, let’s say I want a custom title bar that is common on every view. I think I should be able to define that control with it’s own controller and instantiate that from multiple views. I just don’t know how and the tutorials and questions I’ve read so far don’t address this.

Any tips?

  • 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-26T21:25:22+00:00Added an answer on May 26, 2026 at 9:25 pm

    I’ve found one way to do this is to do the following steps:

    1. Create a new xib file and set the Simulated Metrics to “Freeform” to allow resizing. (MyControl.xib)
    2. Populate the control with the Objects I want in the control.
    3. Create a UIViewController for the view. (MyViewController.h & MyViewController.m)
    4. Set the File's Owner of the MyControl.xib to the Custom Class MyViewController
    5. In the xib that I want to include the control, I put a UIScrollView where I want the control (a regular View will work too). (Parent.xib)
    6. Create an IBOutlet for the UISCrollView that I will put the control into in the ParentController.
    7. Create an instance of MyViewController in the ParentController.
    8. In the ParentController, add the view of the MyViewController as a subview of the UIScrollView.

    In code, this means

    @implementation ParentController
        @synthesize myScrollView;
        MyViewController* myController;
    
        - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
        {
    
            self = [super init];
            if(self) 
            {
                myController = [[MyController alloc] initWithNibName:@"MyView" bundle:nil];
                [myScrollView addSubview:myController.view];
            } 
       }
    

    This seems to work and allows me to separate the implementation of the Control and the Parent, but I can’t help but think there is a better way.

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

Sidebar

Related Questions

I am just starting out with iOS app development and it's been a great
I'm just starting out with iOS programming. I'm wondering why view is an outlet
I am just starting climbing the Objective C learning curve (using Nerd Ranch iOS
Just starting to use Cruise Control, but can't seem to find anything on this
I am just starting iOS development. I read some tutorials, watched stuff on iTunes
I'm new to iOS development. I just installed Xcode 3.2.4 and the iOS 4.1
I'm just starting coding with Xcode and am following a few examples. They show
I'm just starting out with iOS development and I'm actually trying to make an
Just starting to learn ASP.NET (C#) and I am using Visual Studio 2008. I
Im just starting a project and since this project is personal I was wondering

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.