Created
April 21, 2014 11:55
-
-
Save hjazz/11140626 to your computer and use it in GitHub Desktop.
NSArray to va_list
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
NSArray *locArgs = // from alert "loc-args" | |
NSRange range = NSMakeRange(0, [locArgs count]); | |
NSMutableData* data = [NSMutableData dataWithLength: sizeof(id) * [locArgs count]]; | |
[locArgs getObjects: (__unsafe_unretained id *)data.mutableBytes range:range]; | |
NSString *message = [[NSString alloc] initWithFormat:NSLocalizedString(locKey, nil) arguments:data.mutableBytes]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment