dimanche 24 avril 2016

Check NSObject id to compare other, who send into function

I want to send some object to function for check it and set him some data.

For example: i have 4 properties of self class (inherit from NSObject class). And i want to change their data in one function. I must send this properties (as object, not their values) into function, check it to compare with this objects: self.opt1, self.opt2, self.opt3, self.opt4 (compare by object ID, not value), and set them some values.

I try to create function:

- (void)setupMultiplierForObject:(id)object byPointer:(NSString *)pointer

but i don't know how i can check object argument to comparison self.opt1 (object to object, not their values).

What if must set into if (<here>) {} construction?

Aucun commentaire:

Enregistrer un commentaire