需要帮助来替换文本字段条目中的空格以发布到 GET
我当前的代码:
NSString* urlString = [NSString stringWithFormat:@"http://server.com/ios/add.php?user=iPhone+App&message=%@", messageBox.text];
NSURL *add = [NSURL URLWithString:urlString];
[messageView loadRequest:[NSURLRequest requestWithURL:add]];
但是我尝试了
NSString *finalAdd = [add stringByReplacingOccurrencesOfString:@" " withString:@"+"];