Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jmasterman

macrumors newbie
Original poster
Jul 1, 2010
5
0
I was wondering if I could search through an NSMutableArray to find an object. Then if that object fits that that description I could display its information. Like


if ([items hasObject: itemSearchedFor])
{
[textField setStringValue:itemSearchedFor.name];

}
items is the NSMutableArray.

Thank You in advance.:apple:
 
The docs should be your go-to place for simple questions like these.

You're looking for -containsObject:.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.