Created
July 14, 2013 07:42
-
-
Save AlexDenisov/5993526 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)printWithFormat:(NSString *)format arguments:(NSArray *)arguments | |
{ | |
NSRange range = NSMakeRange(0, [arguments count]); | |
NSMutableData * data = [NSMutableData dataWithLength:sizeof(id) * [arguments count]]; | |
[arguments getObjects:(__unsafe_unretained id *)data.mutableBytes range:range]; | |
NSString * result = [[NSString alloc] initWithFormat:format | |
arguments:data.mutableBytes]; | |
NSLog(@"%@", result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment