2012-06-05 59 views

回答

12

像:

NSString *finalString = [controller.body stringByReplacingOccurrencesOfString:@" " withString: @"+"]; 

controller.body = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%@@%@,%@", pinTitle.text, newlatLabel.text, newlogLabel.text]; 

NSString *finalString = [controller.body stringByReplacingOccurrencesOfString:@" " withString: @"+"]; 

controller.body = finalString; 
+0

這裏我把變量「finalString 「? –

+0

然後你可以這樣做:'controller.body = finalString;'如果你願意的話。 – Peres

+0

謝謝!完美的作品 –

1

認爲你正在尋找這樣的:

NSString *finalString = [controller.body stringByReplacingOccurrencesOfString:@" " withString:@"+"];