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

  • Home
  • SEARCH
  • 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 616363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:19:10+00:00 2026-05-13T18:19:10+00:00

I am new to iphone development .I have mutable array recent in which the

  • 0

I am new to iphone development .I have mutable array recent in which the values such as title,date,url and summary are stored as ” object for key”.The keys are myurl,mudate,mytitle,mysummary.I want to sort that mutable array in reference to date and print all the values according to that..How can i achieve that?Please help me out.Thanks.

            [item setObject:currentTitle forKey:@"title"];
            [item setObject:currentLink forKey:@"link"];
            [item setObject:currentSummary forKey:@"description"];
            [item setObject:currentDate forKey:@"pubDate"];//
            [item setObject:currentImage forKey:@"imagePath"];

            [recent addObject:[item copy]];

All are xml parsed contents.

  • 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-13T18:19:10+00:00Added an answer on May 13, 2026 at 6:19 pm

    So I’m guessing you have an array of dictionaries. There are a couple ways to do this, but the one I recommend is using NSSortDescriptor. You’ll want to do something like this:

    //myArray is the name of the your array
    NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"mydate" ascending:YES]; // If you want newest at the top, pass NO instead.
    [myArray sortUsingDescriptor:descriptor]; // This will modify myArray. To return a new array and leave the original untouched, use -sortedArrayUsingDescriptor:.
    [descriptor release];
    NSLog(@"%@", myArray); // Print.
    

    If you you have your dates as NSDate objects already, this will work fine. If not, you’ll either need to loop through the array and parse the dates beforehand, or use the initWithKey:ascending:selector: method of NSSortDescriptor, which allows you to define a custom comparison method.

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

Sidebar

Ask A Question

Stats

  • Questions 525k
  • Answers 525k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is impossible. But you may draw your own softkeys:… May 16, 2026 at 10:14 pm
  • Editorial Team
    Editorial Team added an answer There must be a more elegant way to write this,… May 16, 2026 at 10:14 pm
  • Editorial Team
    Editorial Team added an answer One of my colleagues has developed a way to store… May 16, 2026 at 10:14 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am new to iphone development .I have parsed a xml page and stored
I am new to iphone development.I have displayed the text in the header label.Now
I am new to iphone development.I have created a button in UIView controller.On clicking
I am new to iphone development.I have text on the button.I want only test
I am new to iphone development.I have created a map application.I have created a
I am new to iphone development.I have created map applications and displayed the cuurent
I am new to iphone development.I have created a UIview controller class and added
I am new to iphone development.I have created a UIBarButtonItem on the navigation bar.I
I am new to iphone development .I have displayed a list of contents in
I am new to iPhone development. I have two views named pickerviewcontroller and secondviewcontroller

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.