Reputation: 5879
I'm using
#define SITO @"http://localhost:3000"
#define MISSING @"http://localhost:3000/photos/large/missing.png"
Is it possible to do this dynamically? I mean
#define SITO @"http://localhost:3000"
#define MISSING @"<<SITO>>/photos/large/missing.png"
Upvotes: 0
Views: 284
Reputation: 31722
You are not allowed you embed one micro within other. But you could nested as suggested by @Simon Lee.
Use the below approach.
#define SITO @"http://localhost:3000"
#define MISSING @"<<%@>>/photos/large/missing.png"
Construct a string as belwo.
NSString* Missing = [NSString stringWithFormat:MISSING,SITO];
NSLog(@"Missing %@", Missing);
Upvotes: 0