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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:12:20+00:00 2026-05-24T10:12:20+00:00

I have a split-view app with a button in the detail view that, when

  • 0

I have a split-view app with a button in the detail view that, when clicked, will take the user to a full screen view of the selected image.

I understand that I need a new nib file and view controllers, but I’m not sure how to connect these new files with my existing RootViewController and DetailViewController files.

I know this is really vague, but any help at all would be most appreciated.

  • 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-24T10:12:20+00:00Added an answer on May 24, 2026 at 10:12 am

    As long as you are moving to a single view(as in not another split view) you should only need one more view controller. If I understand what you are doing, then the progression should be something along the lines of:

    1. Create a new view controller with associated .xib file.
    2. Declare the specific instance of your new view controller, in this case called newViewController, in DetailViewController.h and synthesize it in DetailViewController.m

      @interface DetailedViewController
      {    
          NewViewController *newViewController;
      }
      @property (nonatomic, retain) NewViewController *newViewController;
      @end
      
    3. Add your IBAction to the header file of DetailViewController, this will be the function responsible for actually triggering your view switching

    4. Implement the view switch action in your DetailViewController.m file, should look something like this:

      (IBAction)switchToNewView:(id)sender
      {
          if (newViewController == nil)
          {
              NewViewController *newViewController =
                [[NewViewController alloc] 
                  initWithNibName:@"NewViewController"
                  bundle:[NSBundle mainBundle]];
      
              self.newViewController = newViewController;
          }
      
          // How you reference your navigation controller will
          // probably be a little different
          [self.navigationController
             pushViewController:self.newViewController
             animated:YES];
      }
      
    5. Then in your DetailViewController.m file inside of the viewDidLoad function add the following:

      UIBarButtonItem *addButton =
        [[UIBarButtonItem alloc]
          initWithBarButtonSystemItem: UIBarButtonSystemItemAdd
          target:self action:@selector(switchToNewView:)];
      self.navigationItem.rightBarButtonItem = addButton;
      [addButton release];
      
    6. The other option that you have if you choose to implement this through a UIButton, is to go create the button in Interface Builder on your NewViewController.xib, then select it, and in the Connections inspector, create a link between the “touchUpInside” event and the file owner, and then select your switchToNewView IBAction. This should accomplish the same thing.

    Thats the general idea. I hope that helps!

    EDIT: As asked in the comments, if adding a button as a UIBarButton as part of a navigation controller you would simply need to do something like below:

    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(switchToNewView:)];
    self.navigationItem.rightBarButtonItem = addButton;
    [addButton release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a split view-based app that presents a master-detail interface, and uses a
In my current Ipad app, I have a split screen view in which the
I have a split view controller in my Ipad app, in which the detail
We are developing the Web App that will have user subscription to a specific
I have a split view controller-based iPad app that uses a Web View to
I have a split view app running fine on the iPad. It is using
In a split-view-based iPad app I'm using a custom background image in my navigation
So I have a simple split view that functions great except when the view
I have created split view based ipad app, where master view is table view
I have a split View Controller iPad app. Its a port of a iPhone

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.