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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:28:08+00:00 2026-06-02T03:28:08+00:00

I am using the Master-Detail template from XCode 4.3.1 and want to access the

  • 0

I am using the Master-Detail template from XCode 4.3.1 and want to access the toolbar on the detailView control.

[self navigationItem] setTitle:

sets the title, but I can’t figure out how to add barButtonItems either through the xib or programmatically. In the past, with an earlier SplitView Template (when master view was called root view) I could access the rootView toolbar through the Split View Controller in MainWindow.xib and I had the detailView toolbar right there in the detailView.xib file.

What is the best way for me to set these items (I have 4) on the detailView toolbar?

Thanks in advance.

  • 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-02T03:28:12+00:00Added an answer on June 2, 2026 at 3:28 am

    So I’ve got an answer – please let me know if you have a better one!

    In the viewDidLoad method of my masterViewController I populated the toolbar on the detail view with

    [_detailViewController.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects: _detailViewController.firstButton, _detailViewController.secondButton, _detailViewController.thirdButton, nil]];

    I had created these buttons with

    _detailViewController.firstButton = [[UIBarButtonItem alloc] initWithTitle:@”First” style:UIBarButtonItemStylePlain target:self action:@selector(firstButtonAction:)];

    I had declared each of these buttons in the detailViewController.h file so that I could reference them later, but probably didn’t need to use those names – it just made the code longer here. I also had a uiButton that I could not add in the array of buttons, so I created a the button, put it inside a View and then set that as the titleView for the navigation item:

       _detailViewController.biggerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 230, 35)];
        [[_detailViewController biggerButton] addTarget:self action:@selector(biggerButtonTap:) forControlEvents:UIControlEventTouchUpInside];
    
        UIView *biggerButtonView = [[UIView alloc] initWithFrame:CGRectMake(80, 3, 230, 35)];
    
        [biggerButtonView addSubview:_detailViewController.biggerButton];
    
        _detailViewController.navigationItem.titleView = biggerButtonView;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Xcode 4.2 and iOS SDK 5.0 and Apple's Master-Detail Application Template for
I'm using the template master detail application. I have added a modal segue from
I am creating an iPad app using the master-detail template available in Xcode 4.3.
I'm trying to set up a Master/Detail grid using the Grid control from Telerik's
In the master-detail application template (using ARC, storyboards) in XCode 4.3.2, I am trying
In the master-detail application template for iPad in XCode 4.3, the master view (side
Newbie question here ... I've created a Master-Detail Application project in Xcode 4.2 using
I've created a bare bones Master/Detail iPad application using the supplied template. It creates
The Master-Detail Xcode Project Template generates code like: // Customize the appearance of table
I created a project using Master-Detail Application template but i don't need a MasterView.

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.