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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:23:21+00:00 2026-06-13T22:23:21+00:00

I have a class, with some objects (Title, price, modifier), And I have an

  • 0

I have a class, with some objects (Title, price, modifier), And I have an NSArray of objects of this class.

I load this NSArray into UITableView. How can I use searchDisplayController?
I can’t understand.. array have only addresses (to objects in my class) and how i can sort it by predicate?

  • 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-13T22:23:22+00:00Added an answer on June 13, 2026 at 10:23 pm

    I can explain with an example

    Let consider my code is like below

    Without NSPredicate

    NSMutableArray *oldSkoolFiltered = [[NSMutableArray alloc] init];
    for (Book *book in bookshelf) {
        if ([book.publisher isEqualToString:@"Apress"]) {
            [oldSkoolFiltered addObject:book];
        }
    }
    

    Applied NSPredicate

    NSPredicate *predicate = 
      [NSPredicate predicateWithFormat:@"publisher == %@", @"Apress" ];
    NSArray *filtered  = [bookshelf filteredArrayUsingPredicate:predicate];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wrapper class around some objects that I want to use as
Let's say I have some model objects that resemble this: public class FooModel {
Basically I have some class objects, each with three properties. Once one class object
I have a class with a vector of pointers to objects. I've introduced some
Let's say I have an array of objects [{href: 'some_uri', 'class': 'this-css-class'}, {href: 'another_uri',
I'm working on a class-based php web app. I have some places where objects
Assume some domain and view objects (that have no common base class) public class
Suppose I have this model: class PhotoAlbum(models.Model): title = models.CharField(max_length=128) author = models.CharField(max_length=128) class
I have this model: class Event_Category(models.Model): event=models.ForeignKey(Event,related_name='event_category') category=models.ForeignKey(Category,related_name='events') user=models.ForeignKey(User) in the view: magazie_cats=Event_Category.objects.filter(event=instance).order_by('category').distinct() return
I have this two objects - Magazine and Author (M-M relationship): public partial class

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.