I follow official Apple's documentation but i don't seem any relevant answer to my question.
NSLog VS NSLogv
I follow official Apple's documentation but i don't seem any relevant answer to my question.
NSLog VS NSLogv
no difference , NSLog called NSLogv with parameter . So if you user NSLog with some parameter , NSLog Re-called NSLogv Function.
There's a variant of NSLog that accepts a va_list called NSLogv:
- (void) log:(NSString *)text, ... {
va_list args;
va_start(args, text);
NSLogv(text, args);
va_end(args);
}
The only way to forward the actual ... (not the va_list) is to use a macro. For example:
#define MyLog(f, ...) { \
NSLog(f, ##__VA_ARGS__); \
[someObject doSomething:f, ##__VA_ARGS__]; \
}