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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:07:32+00:00 2026-05-19T04:07:32+00:00

I am working on an app to try and learn a bit more about

  • 0

I am working on an app to try and learn a bit more about the cocoa touch framework and am starting to use the UISplitViewController. From what I have learned so far, this has a property called viewControllers that is an array containing the master and detail view controllers for the app.

What I am trying to set up is a folder navigation system in the masterVC, then when a specific file is selected, it is opened in the detailVC. I have got the folder navigation working and can pass the details of the files between the two view controllers.

My problem is that there are several types of files that require different views to display them correctly.

For example a jpeg image will have an image viewer, whereas an html document will have a web view and a txt document will require a text editor view.

What is the best way to change the view controller of the detail pane?

Am I better to have a single View controller and swap different views in and out depending on the file type? Or is there a way to completely remove the viewcontroller and add the appropriate one in its place?

Thanks

  • 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-19T04:07:32+00:00Added an answer on May 19, 2026 at 4:07 am

    I would think you should use multiple view controllers. There’s bound to be a lot of logic in each of these individual view controllers you mentioned that should be properly contained within its own view controller.

    As for displaying the appropriate view controller, you can easily add a view of a UIViewController to any UIViewControllers view, by doing: [self.view addSubview:myTextEditorVC.view]. So in other words, your detailVC could handle the logic of knowing which type of UIViewController it needs to display, instantiate that UIViewController, and display its view within the detailVC‘s view.

    Hope this helps!

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

Sidebar

Related Questions

Okay, here's my setup. I have a c# app working perfectly on all 32-bit
So I have a little app I am working on that scrapes comics from
I'm working on a simple app to learn Cocoa and I've encountered a little
I am working on a facebook app when i try to invoke js for
I am working on some scraping app, i wanted to try to get it
I have my php app working fine, performing some other Graph API functions. However,
I'm currently moving a (working) app from using EclipseLink to Hibernate JPA, mostly it's
I am working on CakePHP, and I have my app working in my localhost.
So I have been working with an app where I need to show the
I have recently started working on an app which has both Java and native

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.