I have variable is: stateName = [store objectAtIndex:0];
and Country: country = [store objectAtIndex:1];
and I put code like this:
NSString* urlString = @"http://maps.google.com/maps?saddr=%@+
%@&daddr=Birmingham+UK",statName,country;
I tried to put code like this:
NSString *test = [NSString stringWithFormat:@"%@", stateName];
NSString *urlString =
@”http://maps.google.com/maps?saddr=%@+UK&daddr=Birmingham+UK”,test;
It didn’t work.
Thank you.
You need to use stringWithFormat if you’re including object data in your string. So:
and
Hope this helps.