For this code example below, usually I would use [self fall]; instead of the code at *, but I need the value of i to be sent to the fall method as well. How do I do this?
- (void)main {
for (int i=0; i <= 100; i++) {
[image[i] fall]; *
}
}
- (void)fall {
// manipulate image[i]; separately from the for loop
}
EDIT: I will accept the oldest answer as all are correct. Thanks!
You need to do –
and call like –
}
EDIT –
If you want to pass index-
and call like –
}
If you want to pass some image –
and call like –
}