此代码位于卡类的实例中。它具有以下属性:self.shape,self.color。 otherCards
NSArray充满了这个类的其他实例,它们也有相同的self.shape等......
但是我想制作一个适用于形状,颜色,数字等的比较方法。通过传递self.shape,它比较otherCards
的self.shape,并通过传递self.color有它
比较otherCards
[self attributesIsEqual:self.shape with attribute:otherCards] //Calling the method
- (BOOL)attributesIsEqual: (id)attribue with: (NSArray *)otherCards
{
// Compare whatever (id) attribute to the same attribute in otherCards
}