Created
March 1, 2013 15:14
-
-
Save paiv/5065281 to your computer and use it in GitHub Desktop.
NSArray to va_list arguments and string format
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
- (NSString *)stringWithFormat:(NSString *)format args:(NSArray *)args | |
{ | |
NSMutableData *data = [NSMutableData dataWithLength:(sizeof(id) * args.count)]; | |
[args getObjects:(__unsafe_unretained id *)data.mutableBytes range:NSMakeRange(0, args.count)]; | |
NSString *so = [[NSString alloc] initWithFormat:format arguments:data.mutableBytes]; | |
return so; | |
} |
Same here. Is it possible that NSTaggedPointerString * has something to do here?
Any solution to this? I ave the same problem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Xcode 8: EXC_BAD_ACCESS