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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:54:09+00:00 2026-06-07T10:54:09+00:00

I have a silly doubt, but I need to understand it properly. I have

  • 0

I have a silly doubt, but I need to understand it properly. I have referred few posts on this but they are still confusing to me.

I have an array which consists of set of urls which i got from parsing a xml and I store the array like this:

Parser.m

else if([elementName isEqualToString:@"image"]){
    self.img.imageUrl = self.currentElement;
     [[self URL_array]addObject:img.imageUrl]; 

}

and if I log the contents it gives the contents as follows:

the URL ARRAY IS --------------------->>>>(
"http://www.bedfordevents.co.uk/images/stories/template/GallerySlideshow/b10.jpg\n",
"http://www.bedfordevents.co.uk/images/stories/template/GallerySlideshow/b11.jpg\n",
"http://www.bedfordevents.co.uk/images/stories/template/GallerySlideshow/b12.jpg\n",
"http://www.bedfordevents.co.uk/images/stories/template/GallerySlideshow/b13.jpg\n",

I need to pass this array to another class/View controller,for which I’ve been doing like this in Parser.m file

ViewController *control = [[ViewController alloc]init];
control.image_array = URL_array;

View controller has an array image_array

and I call the array in ViewController.m like this

NSLog(@"array is----->>%@ ",self.image_array);

But the image_array returns null;

I believe I’m doing it wrong somewhere, Can anyone point out my mistake and help me out?

Thank you.

EDIT

code updated.
now I have a method in ViewController as said

-(void)updateImageArray:(NSMutableArray *)imageArray{
self.image_array = [NSMutableArray arrayWithArray:imageArray];
NSLog(@"array is in here-------->>>>%@",self.image_array);
}

and called

[control updateImageArray:URL_array];

in my Parser.m and the array is displayed in log in ViewController.m and its working

Thank you

  • 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-07T10:54:12+00:00Added an answer on June 7, 2026 at 10:54 am

    From what you wrote in comments, it seems that the viewDidLoad is called BEFORE you set image_array.

    You could add the method [control updateImageArray:URL_array] and then inside this method set self.image_array = [NSArray arrayWithArray:URL_array]; and refresh UI as desired

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

Sidebar

Related Questions

This is probably silly but I don't have enough Elisp knowledge to understand what
I have one query. Maybe it is a silly question but still I need
i now this is a silly question, but i still have some poor understanding
I have this silly argument with a friend and need an authoritative word on
i have a silly doubt regarding counting sort.What is the need to get the
I know this is a silly doubt but I just want to make sure
I always had this silly doubt in mind but never had come up with
I have a silly use case for eclipse: At work, they use 2 spaces
Did not upgrade anything, nothing should have changed, but I may have a silly
I have been stuck on this silly if statement, whatever i do, I cannot

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.