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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:26:00+00:00 2026-06-05T11:26:00+00:00

The Apple guide for isEqual says: Returns a Boolean value that indicates whether the

  • 0

The Apple guide for isEqual says:

Returns a Boolean value that indicates whether the receiver and a
given object are equal. (required)

This method defines what it means for instances to be equal. For
example, a container object might define two containers as equal if
their corresponding objects all respond YES to an isEqual: request.
See the NSData, NSDictionary, NSArray, and NSString class
specifications for examples of the use of this 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.

So my question is if I want to compare two UIButtons or two UILabels (two UIViews) using isEqual, and beforehand I have checked if their classes are the same class and then call isEqual, what is getting checked? are the properties, values, action messages, target objects are getting checked?

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-06-05T11:26:01+00:00Added an answer on June 5, 2026 at 11:26 am

    the isEqual: method of NSObject checks whether the hash of the two objects are equal. In practice, the hash is the address of the instance if it isn’t overridden. However, on simple data container classes, isEqual is overridden, and, for example, the isEqual: method of NSString invokes isEqualToString: after checking that the object being compared to is an NSString instance. Same applies, as I’ve mentioned before, to NSData, NSNumber, NSDate, NSArray and NSDictionary. However, UIView (and all its parents) don’t override isEqual: as there’s no obvious way to decide whether two views are considered equal. You’d better compare another, more significant property of the views to be examined.

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

Sidebar

Related Questions

Apple guide is very specific about releasing connection object: it's done in didFailWithError and
The Apple UI design guide suggests that a UIPageControl is ideal for presenting the
Apple's Threading Programming Guide states that: Although good for occasional communication between threads, you
I'm reading Apple's document Concurrent Programming Guide, and I think of that OperationQueue is
I am reading Apple's Key Value Programming Guide. In the topic, Simple Collection Operators,
Apple < ActiveRecord:Base Orange < ActiveRecord:Base piece_of_fruit = Apple.new I want to know whether
On the Apple guide, there is a step before building the AppStore version: Open
I am trying to use a snippet of code from a Apple programming guide,
I have MAC OS 10.6 (Snow Leopard) and according to Apple's guide on HTTP
I followed iPad Programming Guide from Apple to try to upgrade one of my

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.