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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:48:12+00:00 2026-05-29T23:48:12+00:00

I have customized uitableViewcell in which each cell show four data which are related

  • 0

I have customized uitableViewcell in which each cell show four data which are related to each other(ie object name,details, new price and old price). Data for each label Come from four different array.It is working fine. But now i want to sort table according to ascending price list or alphabetical order of object name on a button click. Problem is if I sort only the corresponding label change in each cell, others label remain same. i want to reorder each cell not individual label as four label are related to each other. Should I use NSDictionary for this or something else.Please guide me how to do it. 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-29T23:48:14+00:00Added an answer on May 29, 2026 at 11:48 pm

    This does not really have anything to do with the Table. You need to think data structures.
    If I were you I will define a class with 4 attributes

    Say

    Class TableData
    {
    
    NSString * name;
    NSString *details;
    int newPrice;
    int oldPrice;
    }
    

    Or something like that.
    And now you can have ONE array with objects being instances of the above class.
    Now you can sort the array by instance.name or instance.newPrice and relations will stay intact.

    You then will just reload the tableView.

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

Sidebar

Related Questions

I have customized the cell with four labels, initially it looks fine but when
I have customized UITableViewCell (Static Content Loaded from nib). This cell contains one UILable
I have a separate method to create customized UITableViewCell, Which is given Below -(UITableViewCell*)getCellContentView:(NSString*)cellIdentifier
i have an customized cell that is loaded in table view cell and each
I have a UIButton in a customized UITableViewCell, which subclassing UITableViewCell. The UIButton is
I have 2 classes for a UITableViewCell that show different data but they use
I have a class A that inherits UITableViewCell (to customize a table cell). It
I have TableCellViewController for managing cells in my UITableView. Each cell has a label
I have a custom UITableViewCell which I created in Interface Builder. I am successfully
I have a tableview cell in a view which has some text in it,the

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.