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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:27:24+00:00 2026-06-09T23:27:24+00:00

How does [array containsObject:id] method works? whether is it compare with addresses or is

  • 0

How does [array containsObject:id] method works? whether is it compare with addresses or is it compare the given objects properties with the array elements properties ?

  • 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-09T23:27:26+00:00Added an answer on June 9, 2026 at 11:27 pm

    Did you first try looking at the documentation for this method?

    This method determines whether anObject is present in the array by sending an isEqual: message to each of the array’s objects (and passing anObject as the parameter to each isEqual: message).

    And from the isEqual: method:

    If two objects are equal, they must have the same hash value. This last point is particularly important if you define isEqual: in a subclass and intend to put instances of that subclass into a collection. Make sure you also define hash in your subclass.

    What we can take from this is, unless you’re comparing two objects of predefined types (e.g. NSArray, NSString) where there is already a system-described way of hashing the object’s contents and comparing the hashes, you need to provide a - (NSUInteger)hash method which returns an unsigned integer whose value, for objects you consider equal, will be equal.

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

Sidebar

Related Questions

How can I Compare values of two arrays to check if 1 array does
How does Array.Reverse() method reverse an array of word without any assignment?
Why does the array a not get initialized by global variable size ? #include<stdio.h>
When you do Something.find(array_of_ids) in Rails, the order of the resulting array does not
Does Java guarantee array initialization? Let's say I use the code char[] uuid =
Native Array in Emberjs does not support deep copy? I saw it just returning
Does anyone know how to store a 1-dimensional Matlab array in a single field
Does someone know why i never get the first value of my array? it
Does Scala have a version of Rubys' each_slice from the Array class?
Does any on know how can I convert this $events = array( array(type =>

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.