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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:34:13+00:00 2026-06-02T02:34:13+00:00

This is probably a basic question though I couldn’t find a clear answer. (I’m

  • 0

This is probably a basic question though I couldn’t find a clear answer. (I’m new to iOS).

This is a quick scheme of my storyboard:
navigationcontroller -> detailviewcontroller -> tableviewcontroller

My detailviewcontroller has 3 buttons. When clicked, they parse an xml from the server and put the elements in an array (called files). (up till here all works fine). So while the array is created, the detail view segues to the tableviewcontroller.

Now my question: how can I pass the array that was created over that segue so I can use it in the tableviewcontroller class to assign the values to the rows? (I know how to assign them, but I don’t know how to pass the array over the segue)

So let’s say I have this code:

if ([segue.identifier isEqualToString:@"pdfSeg"]) {

    NSMutableArray *pdfArray = [[NSMutableArray alloc]initWithArray:xmlParser.files];

    UITableViewController *tvc = [segue destinationViewController];}

How do I tell the segue to send the pdfArray over so I can fill the rows with pdf files?

Thanks a lot.

  • 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-02T02:34:14+00:00Added an answer on June 2, 2026 at 2:34 am

    Consider the array as the model for the controller. Pass it as a property. Also, do you really want to pass a mutable array? Are you just passing information, or do you expect the controller to manage changes to the array?

    So, you add a property…

    From within the DestinationViewController interface, add the property…

    @property (nonatomic, strong) NSMutableArray *pdfArray;
    

    Synthesize it in the implementation…

    @synthesize pdfArray = _pdfArray;
    

    Then, provide the property from within prepareForSeque…

    tvc.pdfArray = pdfArray;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This probably is a dummy question but I cannot find a clear indication. I
This probably is a very very basic question but i can't seem to find
This is probably a basic question, since I'm new to WPF.. I have a
This is probably a really basic question, but I'm new to this and relying
This is probably a fairly basic question but I haven't managed to find anything
This is probably a very basic question, but I'm really new to generics in
This is probably a basic question, better explained through code: public void checkStatus {
This is probably a pretty basic question, but just something that I wanted to
This is probably a basic html/css question... I have a simple one-button form that
Problem : This is a probably a very basic question, but how do I

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.