isEqualTo:和isEqual之间的区别: [英] Difference between isEqualTo: and isEqual:

查看:1471
本文介绍了isEqualTo:和isEqual之间的区别:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些方法之间的区别是什么?

What on earth is the difference between these methods?

推荐答案

isEqual:是NSObject协议的一部分,用于比较对象。

isEqual: is part of the NSObject protocol and is meant for comparing objects.

isEqualTo:是Cocoa AppleScript支持基础结构的一部分(特别是NSComparisonMethods ,它允许AppleScript比较Cocoa对象)。它通常与 isEqual:相同,但如果您希望平等在内部和脚本中工作不同,则可以覆盖。

isEqualTo: is part of the Cocoa AppleScript support infrastructure (specifically, NSComparisonMethods, which allow AppleScript to compare Cocoa objects). It's normally the same as isEqual:, but can be overridden if you want equality to work differently internally and in a script.

这篇关于isEqualTo:和isEqual之间的区别:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆