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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:04:31+00:00 2026-05-21T05:04:31+00:00

I have read some threads about how to imitate the iTunes source list style.

  • 0

I have read some threads about how to imitate the iTunes source list style. But I cannot seem to figure out what needs to be done to let them actually show other things in the main table view.

My setup is this: I have core data in the background containing all the tracks from iTunes and a “state” string that has 3 states. I want to only show parts of the titles on selecting an item in the source list. The source list items match the states of the tracks.
In other words: 3 source list items representing 3 different groups within one dataset. The groups are differentiated with this state variable.

I have tried to make an array of NSStrings and NSPredicates and bind the selected item to the main table views filtering predicate. But it did not work.

Thank you very much for your reply.

EDIT: Setting filter predicates from an array works now. But this does not play well with NSSearch fields that filter the table. Is there another way or can I combine the two predicates easily?

  • 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-21T05:04:32+00:00Added an answer on May 21, 2026 at 5:04 am

    You can “combine” two predicates by “OR”ing or “AND”ing them together. In other words, let’s say you have these two predicates:

    NSPredicate *one = [NSPredicate predicateWithFormat:@"foo = 42"];
    NSPredicate *two = [NSPredicate predicateWithFormat:@"bar = 'abc'"];
    

    You can do:

    NSArray *subpredicates = [NSArray arraWithObjects:one, two, nil];
    NSPredicate *both = [NSCompoundPredicate andPredicateWithSubpredicates:subpredicates];
    //this is equivalent to: foo = 42 AND bar = 'abc'
    

    Or

    NSPredicate *both = [NSCompoundPredicate orPredicateWithSubpredicates:subpredicates];
    //this is equivalent to: foo = 42 OR bar = 'abc'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, I've read some threads about this topic, but actually I was unable to
I just got Delphi 2009 and have previously read some articles about modifications that
I have read through several reviews on Amazon and some books seem outdated. I
I just started to read about this new technology... Does someone have some knowledge
Hmmm... I have read about this issue on various other threads here on stackoverflow
I have read some other articles like here and here but unfortunately there are
I must have read tons of solutions online, but for some idiotic reason I
I read some post about ASP.NET MVC application, but I found only article on
I have read in some of the ClickOnce posts that ClickOnce does not allow
I have read on Stack Overflow some people that have converting to C#2.0 to

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.