I have a very basic question. I\'m a new iPhone programmer. My question is can anybody tell me how can I pass values by reference to a function in obj. C? I know how to do
There is no passing by reference (in C++ sense) in Objective C. You can pass your objects by pointer, and for primitive types by value.
Example:
void func(NSString* string) { ... } void func(NSInteger myint) { ... } .. NSString* str = @"whatever"; NSInteger num = 5; func(str); func(num);