I recently saw a delegate method (which seems to work) and looks like this:
- (void) doSomethingWithThisPieceOfData: (void *) theData;
Then the delegate method distinguishes Data as:
- (void) doSomethingWithThisPieceOfData: (void *) theData {anObject * myObject; myObject = (anObject) theData; ....}
Why does this work, and is it good coding practice? Instead, I would use (id *) theData.
thank.
source
share