Cocoa - Calling a variadic method from another variadic one (NSString stringWithFormat call)
- 阅读更多 关于 Cocoa - Calling a variadic method from another variadic one (NSString stringWithFormat call)
I have a problem with [NSString strigWithFormat:format] because it returns an id, and I have a lot of code where I changed a NSString var to an other personal type. But the compiler does not prevent me that there are places where a NSString is going to be set into another type of object. So I'm writing a category of NSString and I'm goind to replace all my calls to stringWithFormat to myStringWithFormat . The code is : @interface NSString (NSStringPerso) + (NSString*) myStringWithFormat:(NSString *)format; @end @implementation NSString (NSStringPerso) + (NSString*) myStringWithFormat:(NSString