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

The Archive Base Latest Questions

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

I am having a tableView which lists the contents directory which includes jpg, pdf,

  • 0

I am having a tableView which lists the contents directory which includes jpg, pdf, zip, mp3, mp4, sql,.. files and even folders. In the next step, I am having a detailView which displays some properties of the selected file such as fileName, fileSize, filePath, fileType. Everything works perfect.

But actually my plan is to include a additional option in the detailView.

That is,

  1. If the selected file in the tableView is a image file, it should open a imageView in the detailView to display that image.
  2. If the selected file is a mp3, it should open a player to play the song in the detailView.
  3. If the selected file is a video or mp4 file, it should open a player to play that video in detailView.
  4. If the selected item is a folder, it should again open a tableView which dispalys the contents of the folder.
  5. For other files, it should push a alertView regarding that it is a unknown file.

Hope my concept was narrated well. I got the methods for playing the .mp3 and .mp4 files. Now I am stuck in pushing the imageView and in case of a folder. I have no ideas to proceed both the methods.

This is my tableView
alt text

This is my detailView for video file
alt text

This is my detailView for a .mp3 file
alt text

This is the detailView left empty for my imageView.
alt text

Please help me to proceed with some sample codes. Thank you 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-05-18T04:07:26+00:00Added an answer on May 18, 2026 at 4:07 am

    Judging by your screenshots and progress of implementing the other filetypes, I assume you are able to pass the information of the file path to the detail view. So, for the image file, I am going to discuss how to display it into a UIImageView.

    For the image view, You will want create a UIImage with the path.

    Code example below: Assume that pathString is an NSString* with the image path, and that imageView is now a UIImageView which should display the image. This code would reside in the -viewDidLoad method of the detailViewController handling the image display.

    UIImage* theImage = [[UIImage alloc] initWithContentOfFile:pathString];
    imageView.image = theImage;
    [theImage release];
    

    As for the folder view, this is a bit different. For the best result you will want to recursively load the tableViewController you are using to display the list of files now (so that it will inherit all the file/folder handling recursively).

    I would suggest to add an instance variable like folderPath to the tableViewController that you set before actually pushing the view. And the tableViewController should use this as the base path.

    Code example below: Assume that pathString is an NSString* with the destination path, and that detailViewController is now an instance of the new tableViewController to be opened. This code would reside in the method that will create the new detailViewController to be displayed, somewhere within tableView:didSelectRowAtIndexPath:

    detailViewController.folderPath = pathString;
    [self.navigationController pushViewController:detailViewController animated:YES];
    

    You should then implement in the -viewDidLoad method of the tableViewController, on what folder content should be read from the folderPath instance variable.

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

Sidebar

Related Questions

I am having a tableView which lists the contents directory which includes jpg, pdf,
I am having a tableView which lists the contents of a directory which includes
I am having Tableview which shows comments on facebook post. I am getting comments
I am having a custom 'tableview' implementation. I am implementing a feature which I
i am having a tableview in which custom cells are loaded.Custom cell has a
I am having single table view in a view controller. That table view lists
I am having a SampleViewController in which a segmentedControl is added at the top
I am having a few nagging issues with NSFetchedResultsController and CoreData, any of which
I'm developing an iPhone application which uses a TableView to display XML data. The
I'll show you my problem by image. I have tableView in which i customize

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.